MCPcopy
hub / github.com/go-yaml/yaml / is_breakz

Function is_breakz

yamlprivateh.go:137–148  ·  view source on GitHub ↗

Check if the character is a line break or NUL.

(b []byte, i int)

Source from the content-addressed store, hash-verified

135
136// Check if the character is a line break or NUL.
137func is_breakz(b []byte, i int) bool {
138 //return is_break(b, i) || is_z(b, i)
139 return (
140 // is_break:
141 b[i] == '\r' || // CR (#xD)
142 b[i] == '\n' || // LF (#xA)
143 b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85)
144 b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028)
145 b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029)
146 // is_z:
147 b[i] == 0)
148}
149
150// Check if the character is a line break, space, or NUL.
151func is_spacez(b []byte, i int) bool {

Callers 4

Calls

no outgoing calls

Tested by

no test coverage detected