• Home
  • Raw
  • Download

Lines Matching refs:ch

79 static int tryGetISODigit (char ch)  in tryGetISODigit()  argument
81 if ('0' <= ch && ch <= '9') { in tryGetISODigit()
82 return ch - '0'; in tryGetISODigit()
92 static bool isDialable(char ch) in isDialable() argument
94 return ('0' <= ch && ch <= '9') || ch == '*' || ch == '#' || ch == '+'; in isDialable()
98 static bool isSeparator(char ch) in isSeparator() argument
100 return !isDialable(ch) && (isalpha(ch) == 0); in isSeparator()
118 char ch = str[i]; in tryGetTrunkPrefixOmittedStr() local
119 if (tryGetISODigit(ch) >= 0) { in tryGetTrunkPrefixOmittedStr()
127 } else if (isDialable(ch)) { in tryGetTrunkPrefixOmittedStr()
154 char ch = str[i]; in tryGetCountryCallingCode() local
157 if (ch == '+') state = 1; in tryGetCountryCallingCode()
158 else if (ch == '0') state = 2; in tryGetCountryCallingCode()
159 else if (ch == '1') { in tryGetCountryCallingCode()
165 } else if (isDialable(ch)) return -1; in tryGetCountryCallingCode()
169 if (ch == '0') state = 3; in tryGetCountryCallingCode()
170 else if (ch == '1') state = 4; in tryGetCountryCallingCode()
171 else if (isDialable(ch)) return -1; in tryGetCountryCallingCode()
175 if (ch == '1') state = 5; in tryGetCountryCallingCode()
176 else if (isDialable(ch)) return -1; in tryGetCountryCallingCode()
185 int ret = tryGetISODigit(ch); in tryGetCountryCallingCode()
202 } else if (isDialable(ch)) { in tryGetCountryCallingCode()
208 if (ch == '6') state = 9; in tryGetCountryCallingCode()
209 else if (isDialable(ch)) return -1; in tryGetCountryCallingCode()
212 if (ch == '6') { in tryGetCountryCallingCode()
237 static bool checkPrefixIsIgnorable(const char* ch, int i) { in checkPrefixIsIgnorable() argument
240 if (tryGetISODigit(ch[i]) >= 0) { in checkPrefixIsIgnorable()
249 } else if (isDialable(ch[i])) { in checkPrefixIsIgnorable()