Logo Search packages:      
Sourcecode: likewise-open version File versions

size_t str_ascii_charnum ( const char *  s  ) 

Count the number of characters in a string. Normally this will be the same as the number of bytes in a string for single byte strings, but will be different for multibyte.

Definition at line 499 of file util_str.c.

{
      size_t ret;
      char *tmpbuf2 = NULL;
      if (push_ascii_allocate(&tmpbuf2, s) == (size_t)-1) {
            return 0;
      }
      ret = strlen(tmpbuf2);
      SAFE_FREE(tmpbuf2);
      return ret;
}


Generated by  Doxygen 1.6.0   Back to index