isValidSymbolChar method
Implementation
bool isValidSymbolChar(String? ch, bool allowDigits, bool inBrackets) {
if (ch == null) {
return false;
} else {
return (allowDigits &&
ch.compareTo('0') >= 0 &&
ch.compareTo('9') <= 0) ||
(ch.compareTo('a') >= 0 && ch.compareTo('z') <= 0) ||
(ch.compareTo('A') >= 0 && ch.compareTo('Z') <= 0) ||
ch == '[' ||
ch == ']' ||
ch == '%' ||
ch == '*' ||
ch == '^' ||
ch == "'" ||
ch == '"' ||
ch == '_' ||
(inBrackets && ch == '.');
}
}