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

Method validChar

basex-core/src/main/java/org/basex/core/Databases.java:171–173  ·  view source on GitHub ↗

Checks if the specified character is a valid character for a database name. @param ch the character to be checked @param firstLast character is first or last @return result of check

(final int ch, final boolean firstLast)

Source from the content-addressed store, hash-verified

169 * @return result of check
170 */
171 public static boolean validChar(final int ch, final boolean firstLast) {
172 return Token.letterOrDigit(ch) || DBCHARS.indexOf(ch) != -1 || !firstLast && ch == '.';
173 }
174
175 /**
176 * Checks if the specified string is a valid database name.

Callers 3

validMethod · 0.95
nameMethod · 0.95
dbNameMethod · 0.95

Calls 2

letterOrDigitMethod · 0.95
indexOfMethod · 0.45

Tested by

no test coverage detected