#include <OS_String.h>
Inheritance diagram for ACE_OS_String:
Static Public Methods | |
Functions from <cstring> | |
Included are the functions defined in <cstring> and their <cwchar> equivalents.
| |
const void * | memchr (const void *s, int c, size_t len) |
Finds characters in a buffer (const void version). More... | |
void * | memchr (void *s, int c, size_t len) |
Finds characters in a buffer (void version). More... | |
int | memcmp (const void *t, const void *s, size_t len) |
Compares two buffers. More... | |
void * | memcpy (void *t, const void *s, size_t len) |
Copies one buffer to another. More... | |
void * | memmove (void *t, const void *s, size_t len) |
Moves one buffer to another. More... | |
void * | memset (void *s, int c, size_t len) |
Fills a buffer with a character value. More... | |
char * | strcat (char *s, const char *t) |
Appends a string to another string (char version). More... | |
wchar_t * | strcat (wchar_t *s, const wchar_t *t) |
Appends a string to another string (wchar_t version). More... | |
const char * | strchr (const char *s, int c) |
Finds the first occurance of a character in a string (const char version). More... | |
const wchar_t * | strchr (const wchar_t *s, wint_t c) |
Finds the first occurance of a character in a string (const wchar_t version). More... | |
char * | strchr (char *s, int c) |
Finds the first occurance of a character in a string (char version). More... | |
wchar_t * | strchr (wchar_t *s, wint_t c) |
Finds the first occurance of a character in a string (wchar_t version). More... | |
int | strcmp (const char *s, const char *t) |
Compares two strings (char version). More... | |
int | strcmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t) |
Compares two strings (wchar_t version). More... | |
char * | strcpy (char *s, const char *t) |
Copies a string (char version). More... | |
wchar_t * | strcpy (wchar_t *s, const wchar_t *t) |
Copies a string (wchar_t version). More... | |
size_t | strcspn (const char *s, const char *reject) |
Searches for the first substring without any of the specified characters and returns the size of the substring (char version). More... | |
size_t | strcspn (const wchar_t *s, const wchar_t *reject) |
Searches for the first substring without any of the specified characters and returns the size of the substring (wchar_t version). More... | |
char * | strerror (int errnum) |
Returns a system error message. More... | |
size_t | strlen (const char *s) |
Finds the length of a string (char version). More... | |
size_t | strlen (const ACE_WCHAR_T *s) |
Finds the length of a string (ACE_WCHAR_T version). More... | |
char * | strncat (char *s, const char *t, size_t len) |
Appends part of a string to another string (char version). More... | |
ACE_WCHAR_T * | strncat (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) |
Appends part of a string to another string (wchar_t version). More... | |
int | strncmp (const char *s, const char *t, size_t len) |
Compares two arrays (char version). More... | |
int | strncmp (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) |
Compares two arrays (wchar_t version). More... | |
char * | strncpy (char *s, const char *t, size_t len) |
Copies an array (char version). More... | |
ACE_WCHAR_T * | strncpy (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) |
Copies an array (ACE_WCHAR_T version). More... | |
const char * | strpbrk (const char *s1, const char *s2) |
Searches for characters in a string (const char version). More... | |
const wchar_t * | strpbrk (const wchar_t *s1, const wchar_t *s2) |
Searches for characters in a string (const wchar_t version). More... | |
char * | strpbrk (char *s1, const char *s2) |
Searches for characters in a string (char version). More... | |
wchar_t * | strpbrk (wchar_t *s1, const wchar_t *s2) |
Searches for characters in a string (wchar_t version). More... | |
const char * | strrchr (const char *s, int c) |
Finds the last occurance of a character in a string (const char version). More... | |
const wchar_t * | strrchr (const wchar_t *s, wint_t c) |
Finds the last occurance of a character in a string (const wchar_t version). More... | |
char * | strrchr (char *s, int c) |
Finds the last occurance of a character in a string (char version). More... | |
wchar_t * | strrchr (wchar_t *s, wint_t c) |
Finds the last occurance of a character in a string (wchar_t version). More... | |
size_t | strspn (const char *s1, const char *s2) |
Searches for the first substring containing only the specified characters and returns the size of the substring (char version). More... | |
size_t | strspn (const wchar_t *s1, const wchar_t *s2) |
Searches for the first substring containing only the specified characters and returns the size of the substring (wchar_t version). More... | |
const char * | strstr (const char *s, const char *t) |
Finds the first occurance of a substring in a string (const char version). More... | |
const wchar_t * | strstr (const wchar_t *s, const wchar_t *t) |
Finds the first occurance of a substring in a string (const wchar_t version). More... | |
char * | strstr (char *s, const char *t) |
Finds the first occurance of a substring in a string (char version). More... | |
wchar_t * | strstr (wchar_t *s, const wchar_t *t) |
Finds the first occurance of a substring in a string (wchar_t version). More... | |
char * | strtok (char *s, const char *tokens) |
Finds the next token in a string (char version). More... | |
wchar_t * | strtok (wchar_t *s, const wchar_t *tokens) |
Finds the next token in a string (wchar_t version). More... | |
Functions from <cctype> | |
Included are the functions defined in <cctype> and their <cwctype> equivalents.
Since they are often implemented as macros, we don't use the same name here. Instead, we change by prepending "ace_" (with the exception of to_lower).
| |
int | ace_isprint (const ACE_TCHAR c) |
Returns true if the character is a printable character. More... | |
int | ace_isspace (const ACE_TCHAR c) |
Returns true if the character is a space character. More... | |
int | to_lower (int c) |
Converts a character to lower case (char version). More... | |
wint_t | to_lower (wint_t c) |
Converts a character to lower case (wchar_t version). More... | |
Non-standard functions | |
These functions aren't in the standard. | |
char * | itoa (int value, char *string, int radix) |
Converts an integer to a string. More... | |
wchar_t * | itoa (int value, wchar_t *string, int radix) |
Converts an integer to a string. More... | |
int | strcasecmp (const char *s, const char *t) |
Compares two strings (case insensitive const char version). More... | |
int | strcasecmp (const wchar_t *s, const wchar_t *t) |
Compares two strings (case insensitive const wchar_t version). More... | |
const char * | strnchr (const char *s, int c, size_t len) |
Finds the first occurance of a character in an array (const char version). More... | |
const ACE_WCHAR_T * | strnchr (const ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) |
Finds the first occurance of a character in an array (const ACE_WCHAR_T version). More... | |
char * | strnchr (char *s, int c, size_t len) |
Finds the first occurance of a character in an array (char version). More... | |
ACE_WCHAR_T * | strnchr (ACE_WCHAR_T *s, ACE_WINT_T c, size_t len) |
Finds the first occurance of a character in an array (ACE_WCHAR_T version). More... | |
int | strncasecmp (const char *s, const char *t, size_t len) |
Compares two arrays (case insensitive const char version). More... | |
int | strncasecmp (const wchar_t *s, const wchar_t *t, size_t len) |
Compares two arrays (case insensitive const wchar_t version). More... | |
char * | strecpy (char *des, const char *src) |
Copies a string, but returns a pointer to the end of the copied region (char version). More... | |
wchar_t * | strecpy (wchar_t *s, const wchar_t *t) |
Copies a string, but returns a pointer to the end of the copied region (wchar_t version). More... | |
char * | strsncpy (char *dst, const char *src, size_t maxlen) |
This is a "safe" c string copy function (char version). More... | |
ACE_WCHAR_T * | strsncpy (ACE_WCHAR_T *dst, const ACE_WCHAR_T *src, size_t maxlen) |
This is a "safe" c string copy function (wchar_t version). More... | |
const char * | strnstr (const char *s, const char *t, size_t len) |
Finds the first occurance of a substring in an array (const char version). More... | |
const ACE_WCHAR_T * | strnstr (const ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) |
Finds the first occurance of a substring in an array (const wchar_t version). More... | |
char * | strnstr (char *s, const char *t, size_t len) |
Finds the first occurance of a substring in an array (char version). More... | |
ACE_WCHAR_T * | strnstr (ACE_WCHAR_T *s, const ACE_WCHAR_T *t, size_t len) |
Finds the first occurance of a substring in an array (wchar_t version). More... | |
char * | strdup (const char *s) |
Returns a malloced duplicated string (char version). More... | |
wchar_t * | strdup (const wchar_t *s) |
Returns a malloced duplicated string (wchar_t version). More... | |
char * | strtok_r (char *s, const char *tokens, char **lasts) |
Finds the next token in a string (safe char version). More... | |
double | strtod (const char *s, char **endptr) |
Converts a string to a double value (char version). More... | |
double | strtod (const wchar_t *s, wchar_t **endptr) |
Converts a string to a double value (wchar_t version). More... | |
long | strtol (const char *s, char **ptr, int base) |
Converts a string to a long value (char version). More... | |
long | strtol (const wchar_t *s, wchar_t **ptr, int base) |
Converts a string to a long value (wchar_t version). More... | |
unsigned long | strtoul (const char *s, char **ptr, int base) |
Converts a string to an unsigned long value (char version). More... | |
unsigned long | strtoul (const wchar_t *s, wchar_t **ptr, int base) |
Converts a string to an unsigned long value (wchar_t version). More... | |
Static Private Methods | |
Emulation | |
These methods are provided for platforms that do not have a native implementation. | |
char * | itoa_emulation (int value, char *string, int radix) |
Emulated itoa - Converts an integer to a string. More... | |
wchar_t * | itow_emulation (int value, wchar_t *string, int radix) |
Emulated itow - Converts an integer to a string. More... | |
const void * | memchr_emulation (const void *s, int c, size_t len) |
Emulated memchr - Finds a character in a buffer. More... | |
int | strcasecmp_emulation (const char *s, const char *t) |
Emulated strcasecmp - Performs a case insensitive comparison of strings. More... | |
int | strncasecmp_emulation (const char *s, const char *t, size_t len) |
Emulated strncasecmp - Performs a case insensitvie comparison of arrays. More... | |
size_t | strcspn_emulation (const char *s, const char *reject) |
Emulated strcspn - Finds a substring in a string. More... | |
char * | strchr_emulation (char *s, int c) |
Emulated strchr (char version) - Finds the first occurance of a character in a string. More... | |
const char * | strchr_emulation (const char *s, int c) |
Emulated strchr (const char version) - Finds the first occurance of a character in a string. More... | |
char * | strrchr_emulation (char *s, int c) |
Emulated strrchr (char version) - Finds the last occurance of a character in a string. More... | |
const char * | strrchr_emulation (const char *s, int c) |
Emulated strrchr (const char version) - Finds the last occurance of a character in a string. More... | |
char * | strtok_r_emulation (char *s, const char *tokens, char **lasts) |
Emulated strtok_r. More... | |
wchar_t * | wcscat_emulation (wchar_t *destination, const wchar_t *source) |
Emulated wcscat - Appends a string. More... | |
wchar_t * | wcschr_emulation (const wchar_t *string, wint_t c) |
Emulated wcschr - Finds a character in a string. More... | |
int | wcscmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2) |
Emulated wcscmp - Compares strings. More... | |
wchar_t * | wcscpy_emulation (wchar_t *destination, const wchar_t *source) |
Emulated wcscpy - Copies a string. More... | |
int | wcsicmp_emulation (const wchar_t *string1, const wchar_t *string2) |
Emulated wcsicmp - Performs a case insensitive comparison of strings. More... | |
size_t | wcslen_emulation (const ACE_WCHAR_T *string) |
Emulated wcslen - Returns the length of a string. More... | |
ACE_WCHAR_T * | wcsncat_emulation (ACE_WCHAR_T *destination, const ACE_WCHAR_T *source, size_t count) |
Emulated wcscat - Appends a string. More... | |
int | wcsncmp_emulation (const ACE_WCHAR_T *string1, const ACE_WCHAR_T *string2, size_t len) |
Emulated wcsncmp - Compares two arrays. More... | |
ACE_WCHAR_T * | wcsncpy_emulation (ACE_WCHAR_T *destination, const ACE_WCHAR_T *source, size_t len) |
Emulated wcsncpy - Copies an array. More... | |
int | wcsnicmp_emulation (const wchar_t *string1, const wchar_t *string2, size_t len) |
Emulated wcsnicmp - Performs a case insensitive comparison of two arrays. More... | |
wchar_t * | wcspbrk_emulation (const wchar_t *string, const wchar_t *charset) |
Emulated wcspbrk - Searches for characters in a string. More... | |
wchar_t * | wcsrchr_emulation (wchar_t *string, wint_t c) |
Emulated wcsrchr (wchar_t version) - Finds the last occurance of a character in a string. More... | |
const wchar_t * | wcsrchr_emulation (const wchar_t *string, wint_t c) |
Emulated wcsrchr (const wchar_t version) - Finds the last occurance of a character in a string. More... | |
size_t | wcscspn_emulation (const wchar_t *string, const wchar_t *reject) |
Emulated wcscspn. More... | |
size_t | wcsspn_emulation (const wchar_t *string, const wchar_t *charset) |
Emulated wcsspn. More... | |
wchar_t * | wcsstr_emulation (const wchar_t *string, const wchar_t *charset) |
Emulated wcsstr - Performs a case insensitive comparison of two strings. More... |
|
Returns true if the character is a printable character.
|
|
Returns true if the character is a space character.
|
|
Converts an integer to a string.
|
|
Converts an integer to a string.
|
|
Emulated itoa - Converts an integer to a string.
|
|
Emulated itow - Converts an integer to a string.
|
|
Finds characters in a buffer (void version).
|
|
Finds characters in a buffer (const void version).
|
|
Emulated memchr - Finds a character in a buffer.
|
|
Compares two buffers.
|
|
Copies one buffer to another.
|
|
Moves one buffer to another.
|
|
Fills a buffer with a character value.
|
|
Compares two strings (case insensitive const wchar_t version).
|
|
Compares two strings (case insensitive const char version).
|
|
Emulated strcasecmp - Performs a case insensitive comparison of strings.
|
|
Appends a string to another string (wchar_t version).
|
|
Appends a string to another string (char version).
|
|
Finds the first occurance of a character in a string (wchar_t version).
|
|
Finds the first occurance of a character in a string (char version).
|
|
Finds the first occurance of a character in a string (const wchar_t version).
|
|
Finds the first occurance of a character in a string (const char version).
|
|
Emulated strchr (const char version) - Finds the first occurance of a character in a string.
|
|
Emulated strchr (char version) - Finds the first occurance of a character in a string.
|
|
Compares two strings (wchar_t version).
|
|
Compares two strings (char version).
|
|
Copies a string (wchar_t version).
|
|
Copies a string (char version).
|
|
Searches for the first substring without any of the specified characters and returns the size of the substring (wchar_t version).
|
|
Searches for the first substring without any of the specified characters and returns the size of the substring (char version).
|
|
Emulated strcspn - Finds a substring in a string.
|
|
Returns a malloced duplicated string (wchar_t version).
|
|
Returns a malloced duplicated string (char version).
|
|
Copies a string, but returns a pointer to the end of the copied region (wchar_t version).
|
|
Copies a string, but returns a pointer to the end of the copied region (char version).
|
|
Returns a system error message.
|
|
Finds the length of a string (ACE_WCHAR_T version).
|
|
Finds the length of a string (char version).
|
|
Compares two arrays (case insensitive const wchar_t version).
|
|
Compares two arrays (case insensitive const char version).
|
|
Emulated strncasecmp - Performs a case insensitvie comparison of arrays.
|
|
Appends part of a string to another string (wchar_t version).
|
|
Appends part of a string to another string (char version).
|
|
Finds the first occurance of a character in an array (ACE_WCHAR_T version).
|
|
Finds the first occurance of a character in an array (char version).
|
|
Finds the first occurance of a character in an array (const ACE_WCHAR_T version).
|
|
Finds the first occurance of a character in an array (const char version).
|
|
Compares two arrays (wchar_t version).
|
|
Compares two arrays (char version).
|
|
Copies an array (ACE_WCHAR_T version).
|
|
Copies an array (char version).
|
|
Finds the first occurance of a substring in an array (wchar_t version).
|
|
Finds the first occurance of a substring in an array (char version).
|
|
Finds the first occurance of a substring in an array (const wchar_t version).
|
|
Finds the first occurance of a substring in an array (const char version).
|
|
Searches for characters in a string (wchar_t version).
|
|
Searches for characters in a string (char version).
|
|
Searches for characters in a string (const wchar_t version).
|
|
Searches for characters in a string (const char version).
|
|
Finds the last occurance of a character in a string (wchar_t version).
|
|
Finds the last occurance of a character in a string (char version).
|
|
Finds the last occurance of a character in a string (const wchar_t version).
|
|
Finds the last occurance of a character in a string (const char version).
|
|
Emulated strrchr (const char version) - Finds the last occurance of a character in a string.
|
|
Emulated strrchr (char version) - Finds the last occurance of a character in a string.
|
|
This is a "safe" c string copy function (wchar_t version). Unlike strncpy() this function will always add a terminating '\0' char if maxlen > 0. So the user doesn't has to provide an extra '\0' if the user wants a '\0' terminated dst. The function doesn't check for a 0 <dst>, because this will give problems anyway. When <src> is 0 an empty string is made. We do not "touch" *<dst> if maxlen is 0. Returns <dst>. Care should be taken when replacing strncpy() calls, because in some cases a strncpy() user is using the "not '\0' terminating" feature from strncpy(). This happens most when the call to strncpy() was optimized by using a maxlen which is 1 smaller than the size because there's always written a '\0' inside this last position. Very seldom it's possible that the '\0' padding feature from strncpy() is needed. |
|
This is a "safe" c string copy function (char version). Unlike strncpy() this function will always add a terminating '\0' char if maxlen > 0. So the user doesn't has to provide an extra '\0' if the user wants a '\0' terminated dst. The function doesn't check for a 0 <dst>, because this will give problems anyway. When <src> is 0 an empty string is made. We do not "touch" *<dst> if maxlen is 0. Returns <dst>. Care should be taken when replacing strncpy() calls, because in some cases a strncpy() user is using the "not '\0' terminating" feature from strncpy(). This happens most when the call to strncpy() was optimized by using a maxlen which is 1 smaller than the size because there's always written a '\0' inside this last position. Very seldom it's possible that the '\0' padding feature from strncpy() is needed. |
|
Searches for the first substring containing only the specified characters and returns the size of the substring (wchar_t version).
|
|
Searches for the first substring containing only the specified characters and returns the size of the substring (char version).
|
|
Finds the first occurance of a substring in a string (wchar_t version).
|
|
Finds the first occurance of a substring in a string (char version).
|
|
Finds the first occurance of a substring in a string (const wchar_t version).
|
|
Finds the first occurance of a substring in a string (const char version).
|
|
Converts a string to a double value (wchar_t version).
|
|
Converts a string to a double value (char version).
|
|
Finds the next token in a string (wchar_t version).
|
|
Finds the next token in a string (char version).
|
|
Finds the next token in a string (safe char version).
|
|
Emulated strtok_r.
|
|
Converts a string to a long value (wchar_t version).
|
|
Converts a string to a long value (char version).
|
|
Converts a string to an unsigned long value (wchar_t version).
|
|
Converts a string to an unsigned long value (char version).
|
|
Converts a character to lower case (wchar_t version).
|
|
Converts a character to lower case (char version).
|
|
Emulated wcscat - Appends a string.
|
|
Emulated wcschr - Finds a character in a string.
|
|
Emulated wcscmp - Compares strings.
|
|
Emulated wcscpy - Copies a string.
|
|
Emulated wcscspn.
|
|
Emulated wcsicmp - Performs a case insensitive comparison of strings.
|
|
Emulated wcslen - Returns the length of a string.
|
|
Emulated wcscat - Appends a string.
|
|
Emulated wcsncmp - Compares two arrays.
|
|
Emulated wcsncpy - Copies an array.
|
|
Emulated wcsnicmp - Performs a case insensitive comparison of two arrays.
|
|
Emulated wcspbrk - Searches for characters in a string.
|
|
Emulated wcsrchr (const wchar_t version) - Finds the last occurance of a character in a string.
|
|
Emulated wcsrchr (wchar_t version) - Finds the last occurance of a character in a string.
|
|
Emulated wcsspn.
|
|
Emulated wcsstr - Performs a case insensitive comparison of two strings.
|