MCPcopy Create free account
hub / github.com/Effect-TS/effect / qnameColon

Function qnameColon

packages/effect/src/encoding/Xml.ts:1065–1071  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

1063// Returns the index of the colon in a name, -1 when it has none, or -2 when it
1064// is not a qualified name
1065const qnameColon = (name: string): number => {
1066 const colon = name.indexOf(":")
1067 return colon !== -1 && (colon === 0 || colon === name.length - 1 || name.indexOf(":", colon + 1) !== -1 ||
1068 !isNameStartCode(name.charCodeAt(colon + 1))) ?
1069 -2 :
1070 colon
1071}
1072
1073const skipSpace = (s: string, i: number, end: number): number => {
1074 while (i < end && isSpace(s.charCodeAt(i))) i++

Callers 2

resolveQNameFunction · 0.85
qnameColonMethod · 0.85

Calls 1

isNameStartCodeFunction · 0.85

Tested by

no test coverage detected