|
Defines |
#define | SWIchar_isspace(x) |
| Tests whether a character is a whitespace character.
|
#define | SWIchar_iswspace(x) |
| Tests whether a wide character is a whitespace character.
|
#define | SWIchar_isdigit(x) ((x) >= '0' && (x) <= '9') |
| Tests whether a character is a digit.
|
#define | SWIchar_iswdigit(x) ((x) >= L'0' && (x) <= L'9') |
| Tests whether a wide character is a digit.
|
#define | SWIchar_isalpha(x) |
| Tests whether a character is alphanumeric.
|
#define | SWIchar_iswalpha(x) |
| Tests whether a wide character is alphanumeric.
|
#define | SWIchar_MAXSTRLEN 64 |
#define | SWIswscanf swscanf |
Enumerations |
enum | SWIcharResult {
SWIchar_CONVERSION_LOSS = -6,
SWIchar_BUFFER_OVERFLOW = -5,
SWIchar_OUT_OF_MEMORY = -4,
SWIchar_INVALID_INPUT = -3,
SWIchar_FAIL = -2,
SWIchar_ERROR = -1,
SWIchar_SUCCESS = 0
} |
Functions |
const wchar_t * | SWIcharReturnCodeToWcs (SWIcharResult rc) |
*SWIPRINTF_API int | SWIfprintf (FILE *file, const char *format,...) |
SWIPRINTF_API int | SWIfwprintf (FILE *file, const wchar_t *format,...) |
SWIPRINTF_API int | SWIsprintf (char *str, size_t maxlen, const char *format,...) |
SWIPRINTF_API int | SWIswprintf (wchar_t *wcs, size_t maxlen, const wchar_t *format,...) |
SWIPRINTF_API int | SWIvsprintf (char *str, size_t maxlen, const char *format, va_list args) |
SWIPRINTF_API int | SWIvswprintf (wchar_t *wcs, size_t maxlen, const wchar_t *format, va_list args) |
SWIPRINTF_API wchar_t * | SWIfgetws (wchar_t *ws, int n, FILE *stream) |
*double | SWIatof (const char *str) |
| Convert a string to double.
|
float | SWIatofloat (const char *str) |
| Convert a string to float.
|
SWIcharResult | SWIdtostr (double d, char *str, int len) |
| Convert a double to a string.
|
SWIcharResult | SWIdtowcs (double d, wchar_t *wstr, int len) |
| Convert a double to a wide string.
|
double | SWIwcstod (const wchar_t *wstr) |
| Convert a wide string to double.
|
float | SWIwcstof (const wchar_t *wstr) |
| Convert a wide string to float.
|
SWIcharResult | SWIwtof (const wchar_t *wstr, float *fval) |
| Convert a wide string to float.
|
SWIcharResult | SWIstrtowcs (const char *str, wchar_t *wstr, int len) |
| Convert a narrow string to wide.
|
SWIcharResult | SWIwcstostr (const wchar_t *wstr, char *str, int len) |
| Convert a wide string to narrow.
|
SWIcharResult | SWIitowcs (int i, wchar_t *wstr, int len) |
| Convert a integer to a wide string.
|
SWIcharResult | SWIwcstoi (const wchar_t *wstr, int *pi) |
| Convert a integer to a wide string.
|
int | SWIwtoi (const wchar_t *wstr) |
| Convert a wide string to an integer.
|
int | SWIwcsstrcmp (const wchar_t *w, const char *str) |
| Compares a wide string to a narrow string.
|
int | SWIisascii (const wchar_t *wstr) |
| Tests that the given wchar string contains only ASCII characters, which are any character with a value less than than or equal to 0x7F.
|
int | SWIislatin1 (const wchar_t *wstr) |
| Tests that the given wchar string contains only LATIN-1 characters, which are any character with a value less than than or equal to 0xFF.
|
int | SWIisvalid_unicode (const wchar_t *wstr) |
| Tests that the given wchar string
- does not contain high surrogates (D800 to DBFF)
- does not contain non-characters (FFFE and FFFF)
- the top 16-bit of 32-bit wchar are 0.
|
wchar_t * | SWIwcstok (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr) |
| Find the next token in a wide string.
|
char * | SWIstrtok (char *str, const char *delim, char **ptr) |
| Find the next token in a string.
|
*SWIcharResult | SWIwcstoutf8 (const wchar_t *src, unsigned char *dst, int maxdstlen) |
| Wide to UTF-8 conversion.
|
SWIcharResult | SWIutf8towcs (const unsigned char *src, wchar_t *dst, int maxdstlen) |
| UTF-8 to wide conversion.
|
int | SWIwcstoutf8len (const wchar_t *src) |
| Returns the length of a UTF-8 string after conversion from wide.
|
int | SWIutf8towcslen (const unsigned char *src) |
| Returns the length of a wide string after conversion from UTF-8.
|