Functions | |
size_t | wcslen16 (const WCHAR16 *src) |
WCHAR16 * | wcschr16 (const WCHAR16 *src, WCHAR16 character) |
int | wcsncmp16 (const WCHAR16 *src1, const WCHAR16 *src2, size_t len) |
int | wcscmp16 (const WCHAR16 *src1, const WCHAR16 *src2) |
WCHAR16 * | wcscpy16 (WCHAR16 *dst, const WCHAR16 *src) |
WCHAR16 * | wcsncpy16 (WCHAR16 *dst, const WCHAR16 *src, size_t len) |
WCHAR16 * | wcscat16 (WCHAR16 *dst, const WCHAR16 *src) |
WCHAR16 * | wcsncat16 (WCHAR16 *dst, const WCHAR16 *src, size_t len) |
WCHAR16 * | wcsdup16 (const WCHAR16 *src) |
int | wcsfind16 (const WCHAR16 *s, const WCHAR16 *t, const int pos=0) |
int | wcsspn16 (const WCHAR16 *src1, const WCHAR16 *src2) |
WCHAR16 * | wcspbrk16 (const WCHAR16 *src1, const WCHAR16 *src2) |
WCHAR16 * | wcstok_r16 (WCHAR16 *s1, const WCHAR16 *s2, WCHAR16 **context) |
WCHAR16 * | wcsstr16 (WCHAR16 *src1, WCHAR16 *src2) |
const WCHAR16 * | wcsstr16 (const WCHAR16 *src1, const WCHAR16 *src2) |
int | wtoi16 (const WCHAR16 *src) |
size_t | wcstombs16 (char *dst, const WCHAR16 *src, size_t len) |
size_t | mbstowcs16 (WCHAR16 *dst, const char *src, size_t len) |
char * | _wcstombs16 (char *dst, const WCHAR16 *src, size_t len) |
WCHAR16 * | _mbstowcs16 (WCHAR16 *dst, const char *src, size_t len) |
template<typename T > | |
WCHAR16 * | itow16_binary (T src, WCHAR16 *dst, const size_t len) |
This module contains some useful functions and macros for handling of WCHAR16 strings. Use these routines on platforms which have no built-in support for <wchar.h> library or when sizeof(wchar_t) != 2.
Please note that this piece of source code is not directly part of the MLPI. You do not need this file to program against the MLPI. Nevertheless, at least parts of this file have been considered to be somewhat useful when using or learning to use MLPI functionality. It is therefore included without any support, but to act as sample code and source of inspiration.
|
inline |
Function determines the length of the WCHAR16 string (without the NULL terminator).
[in] | src | WCHAR16 string. |
Definition at line 115 of file wchar16.h.
Referenced by utilParameterParseIdn(), wcsdup16(), and wcsstr16().
Function searches a WCHAR16 character in a WCHAR16 string.
[in] | src | WCHAR16 string. |
[in] | character | WCHAR16 character to be located. |
Definition at line 133 of file wchar16.h.
Referenced by utilParameterParseIdn().
Function compares two WCHAR16 strings up to a certain length with each other.
[in] | src1 | WCHAR16 string to be compared. |
[in] | src2 | WCHAR16 string to be compared. |
[in] | len | Maximum number of characters to compared |
Function compares two WCHAR16 strings with each other.
[in] | src1 | WCHAR16 sting to be compared. |
[in] | src2 | WCHAR16 sting to be compared. |
Function copies a WCHAR16 string.
[out] | dst | Pointer to the destination array, where the content is to be copied. |
[in] | src | WCHAR16 string to be copied. |
Definition at line 210 of file wchar16.h.
Referenced by utilParameterParseIdn(), and wcsdup16().
Function copies a specified number of WCHAR16 characters of a WCHAR16 string.
[out] | dst | Pointer to the destination array, where the content is to be copied. |
[in] | src | WCHAR16 string to be copied. |
[in] | len | Maximum number of characters to be copied from src. |
Function appends a WCHAR16 string to another.
[out] | dst | Pointer to the destination array, which should contain a WCHAR16 string, and be large enough to contain the concatenated resulting string, including the additional NULL terminator. |
[in] | src | WCHAR16 string to be appended. This should not overlap dst. |
Definition at line 246 of file wchar16.h.
Referenced by utilParameterParseIdn().
Function appends a WCHAR16 string with a certain length to another.
[out] | dst | Pointer to the destination array, which should contain a WCHAR16 string, and be large enough to contain the concatenated resulting string, including the additional NULL terminator. |
[in] | src | WCHAR16 string to be appended. |
[in] | len | Maximum number of characters to be appendend. |
Function appends a WCHAR16 string with a certain length to another.
[in] | src | WCHAR16 string. |
Definition at line 285 of file wchar16.h.
References wcscpy16(), and wcslen16().
Function to determine the positon of one string in another.
[in] | s | WCHAR16 string to be scanned. |
[in] | t | WCHAR16 string to be searched in s. |
[in] | pos | Position in s where the search should start. |
Function to determine the length of the matching WCHAR16 string.
[in] | src1 | WCHAR16 string to be scanned. |
[in] | src2 | WCHAR16 string containing the characters to match. |
Definition at line 328 of file wchar16.h.
Referenced by wcstok_r16().
Function scans WCHAR16 strings for characters in specified character sets.
[in] | src1 | WCHAR16 string to be scanned. |
[in] | src2 | WCHAR16 string containing the characters to match. |
Definition at line 350 of file wchar16.h.
Referenced by wcstok_r16().
Function to disassemble a WCHAR16 string for certain WCHAR16 characters. A sequence of calls to this function split s1 into tokens, which are sequences of contiguous WCHAR16 characters separated by any of the WCHAR16 characters that are part of the delimiter.
[in] | s1 | WCHAR16 string containing token or tokens. |
[in] | s2 | Set of delimiter characters. |
[out] | context | Used to store position information. |
Definition at line 375 of file wchar16.h.
References wcspbrk16(), and wcsspn16().
Referenced by utilLogicGetSymbolList().
Function searches for a specific WCHAR16 string sequence in a WCHAR16 string.
[in] | src1 | WCHAR16 string to be scanned. |
[in] | src2 | WCHAR16 string containing the characters to match. |
Definition at line 403 of file wchar16.h.
References wcslen16().
Function searches for a specific WCHAR16 string sequence in a WCHAR16 string.
[in] | src1 | WCHAR16 string to be scanned. |
[in] | src2 | WCHAR16 string containing the characters to match. |
Definition at line 418 of file wchar16.h.
References wcslen16().
|
inline |
Function converts a WCHAR16 string to integer.
[in] | src | WCHAR16 string to be converted. |
Definition at line 432 of file wchar16.h.
Referenced by utilParameterParseIdn().
|
inline |
Function translates WCHAR16 characters from the sequence pointed by src to the multibyte equivalent sequence (which is stored at the array pointed by dst), up until either len bytes have been translated or until a WCHAR16 character translates into a NULL character.
[out] | dst | Pointer to an array of char elements long enough to contain the resulting sequence. |
[in] | src | WCHAR16 string to be translated. |
[in] | len | Maximum number of bytes to be written to dst. |
Definition at line 449 of file wchar16.h.
Referenced by _wcstombs16().
|
inline |
Function converts a sequence of multibyte characters to a corresponding sequence of WCHAR16 characters.
[out] | dst | Pointer to the address of a sequence of WCHAR16 characters. |
[in] | src | Pointer to the address of a sequence of mulitybyte characters. |
[in] | len | The number of multibyte characters to convert. |
Definition at line 473 of file wchar16.h.
Referenced by _mbstowcs16(), utilParameterParseIdn(), and utilParameterParseSercosTimeToString().
|
inline |
Function translates WCHAR16 characters from the sequence pointed by src to the multibyte equivalent sequence (which is stored at the array pointed by dst), up until either len bytes have been translated or until a WCHAR16 character translates into a NULL character.
[out] | dst | Pointer to an array of char elements long enough to contain the resulting sequence. |
[in] | src | WCHAR16 string to be translated. |
[in] | len | Maximum number of bytes to be written to dst. |
Definition at line 497 of file wchar16.h.
References wcstombs16().
Function converts a sequence of multibyte characters to a corresponding sequence of WCHAR16 characters.
[out] | dst | Pointer to the address of a sequence of WCHAR16 characters. |
[in] | src | Pointer to the address of a sequence of mulitybyte characters. |
[in] | len | The number of multibyte characters to convert. |
Definition at line 510 of file wchar16.h.
References mbstowcs16().
Function to convert a data type to a binary string. (UCHAR) 0xC => "1010".
[in] | src | This data (of type T) will be converted to a binary string. |
[out] | dst | Destination to store string (must be greater than the number of bits src has). |
[in] | len | Size of available storage. |