MCPcopy Index your code
hub / github.com/XmirrorSecurity/OpenSCA-cli / isInCharacterRange

Function isInCharacterRange

opensca/sca/java/xml/xml.go:1149–1156  ·  view source on GitHub ↗

Decide whether the given rune is in the XML Character Range, per the Char production of https://www.xml.com/axml/testaxml.htm, Section 2.2 Characters.

(r rune)

Source from the content-addressed store, hash-verified

1147// the Char production of https://www.xml.com/axml/testaxml.htm,
1148// Section 2.2 Characters.
1149func isInCharacterRange(r rune) (inrange bool) {
1150 return r == 0x09 ||
1151 r == 0x0A ||
1152 r == 0x0D ||
1153 r >= 0x20 && r <= 0xD7FF ||
1154 r >= 0xE000 && r <= 0xFFFD ||
1155 r >= 0x10000 && r <= 0x10FFFF
1156}
1157
1158// Get name space name: name with a : stuck in the middle.
1159// The part before the : is the name space identifier.

Callers 3

textMethod · 0.85
escapeTextFunction · 0.85
EscapeStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected