H:/Class/11756/HLab/sphinxbase-0.4/include/case.h File Reference

Locale-independent implementation of case swapping operation. More...

#include <prim_type.h>
#include <sphinxbase_export.h>
#include <string.h>

Go to the source code of this file.

Defines

#define UPPER_CASE(c)   ((((c) >= 'a') && ((c) <= 'z')) ? (c-32) : c)
#define LOWER_CASE(c)   ((((c) >= 'A') && ((c) <= 'Z')) ? (c+32) : c)

Functions

SPHINXBASE_EXPORT void ucase (char *str)
SPHINXBASE_EXPORT void lcase (char *str)
SPHINXBASE_EXPORT int32 strcmp_nocase (const char *str1, const char *str2)
SPHINXBASE_EXPORT int32 strncmp_nocase (const char *str1, const char *str2, size_t len)

Detailed Description

Locale-independent implementation of case swapping operation.

This function implements ASCII-only case switching and comparison related operations, which do not depend on the locale and are guaranteed to exist on all versions of Windows.


Define Documentation

#define LOWER_CASE (  )     ((((c) >= 'A') && ((c) <= 'Z')) ? (c+32) : c)

Return lower case form for c

#define UPPER_CASE (  )     ((((c) >= 'a') && ((c) <= 'z')) ? (c-32) : c)

Return upper case form for c


Function Documentation

SPHINXBASE_EXPORT void lcase ( char *  str  ) 

Convert str to all lower case

Parameters:
str is a string.
SPHINXBASE_EXPORT int32 strcmp_nocase ( const char *  str1,
const char *  str2 
)

(FIXME! The implementation is incorrect!) Case insensitive string compare. Return the usual -1, 0, +1, depending on str1 <, =, > str2 (case insensitive, of course).

Parameters:
str1 is the first string.
str2 is the second string.
SPHINXBASE_EXPORT int32 strncmp_nocase ( const char *  str1,
const char *  str2,
size_t  len 
)

Like strcmp_nocase() but with a maximum length.

SPHINXBASE_EXPORT void ucase ( char *  str  ) 

Convert str to all upper case.

Parameters:
str is a string.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sat May 8 14:21:41 2010 for HLab by  doxygen 1.6.3