Beispiel #1
0
// symbol test
static bool isSymbolChar(_TCHAR i_c)
{
	if (i_c == _T('\0'))
		return false;
	if (_istlead(i_c) ||
		_istalpha(i_c) ||
		_istdigit(i_c) ||
		_istlead(i_c))
		return true;

#ifdef UNICODE
	if (0x80 <= i_c && _istgraph(i_c))
		return true;
#endif // UNICODE

	if (_istpunct(i_c))
		return !!_tcschr(_T("-+/?_\\"), i_c);

#ifdef UNICODE
	// check arrows
	if (_tcschr(_T("\x2190\x2191\x2192\x2193"), i_c)) {
		return true;
	}
#endif // UNICODE
	return _istgraph(i_c);
}
Beispiel #2
0
static bool
OnlyDigitsAndPunctuation(const TCHAR *s)
{
  while (*s) {
    if (!(IsDigitASCII(*s) || _istpunct(*s)))
      return false;
    s++;
  }
  return true;
}
Beispiel #3
0
int ispunct( int c ) { return _istpunct(c); }