Exemplo n.º 1
0
VOID CharsUtilTest()
{
   CHAR c = 'a';
   TEST('A' == CharToUpper(c), "CharToUpper failed");

   TEST(10 == CharToHexDigit(c), "CharToHexDigit failed");

   TEST(false == CharIsSpace(c), "CharIsSpace failed");
   TEST(true == CharIsSpace(' '), "CharIsSpace failed");

   //printf("Chars util tests completed\n");
}
Exemplo n.º 2
0
ulen Tokenizer::ScanSpace(StrLen text)
 {
  ulen len=text.len;

  for(; +text && CharIsSpace(*text) ;++text);

  return len-text.len;
 }
Exemplo n.º 3
0
template <class T> T _NextWhiteSpaceOrQuote(T psz) {
   while ((0 != psz[0]) && ! ('"' == psz[0]) && ! CharIsSpace(psz[0])) {
      psz = CharNext(psz);
   }
   return psz;
}
Exemplo n.º 4
0
template <class T> T _SkipWhiteSpace(T psz) {
   while(CharIsSpace(psz[0])) {
      psz = CharNext(psz);
   }
   return psz;
}