MCPcopy Create free account
hub / github.com/BaseXdb/basex / cl

Method cl

basex-core/src/main/java/org/basex/util/Token.java:242–244  ·  view source on GitHub ↗

Returns the byte length of a UTF-8 character. @param b first byte of a token @return character length

(final byte b)

Source from the content-addressed store, hash-verified

240 * @return character length
241 */
242 public static int cl(final byte b) {
243 return b >= 0 || b < -64 ? 1 : b < -32 ? 2 : b < -16 ? 3 : 4;
244 }
245
246 /**
247 * Returns the byte length of a UTF-8 character at the specified position.

Callers 15

readMethod · 0.95
getMethod · 0.95
compareMethod · 0.95
compareMethod · 0.95
cpMethod · 0.95
cpOffsetsMethod · 0.95
forEachCpMethod · 0.95
lengthMethod · 0.95
indexOfMethod · 0.95
lastIndexOfMethod · 0.95
subtokenMethod · 0.95
chopMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected