libcommonc++
0.7
|
UTF-16 character array operations. More...
#include <CharOps.h++>
Static Public Member Functions | |
static int | compare (const char16_t *a, const char16_t *b, bool ignoreCase=false) |
Compare two UTF-16 character arrays. More... | |
static int | compare (const char16_t a, const char16_t b, bool ignoreCase=false) |
Compare two UTF-16 characters. More... | |
static int | compare (const char16_t *a, const char16_t *b, uint_t n, bool ignoreCase=false) |
Compare two UTF-16 character arrays. More... | |
static char16_t * | move (char16_t *dest, char16_t *src, uint_t n) |
Move an array of UTF-16 characters to another, possibly overlapping array. More... | |
static const char16_t * | find (const char16_t *str, char16_t c, uint_t len=0) |
Find a UTF-16 character in a UTF-16 character array. More... | |
static char16_t * | find (char16_t *str, char16_t c, uint_t len=0) |
Find a UTF-16 character in a UTF-16 character array. More... | |
static const char16_t * | find (const char16_t *str, const char16_t *s) |
Find a UTF-16 character sequence in a UTF-16 character array. More... | |
static char16_t * | find (char16_t *str, const char16_t *s) |
Find a UTF-16 character sequence in a UTF-16 character array. More... | |
static const char16_t * | findLast (const char16_t *str, char16_t c, uint_t fromIndex=END) |
Find the last occurrence of a UTF-16 character in a UTF-16 character array. More... | |
static char16_t * | findLast (char16_t *str, char16_t c, uint_t fromIndex=END) |
Find the last occurrence of a UTF-16 character in a UTF-16 character array. More... | |
static const char16_t * | findLast (const char16_t *str, const char16_t *s, uint_t fromIndex=END) |
Find the last occurrence of a UTF-16 character sequence in a UTF-16 character* array. More... | |
static char16_t * | findLast (char16_t *str, const char16_t *s, uint_t fromIndex=END) |
Find the last occurrence of a UTF-16 character sequence in a UTF-16 character* array. More... | |
static uint_t | length (const char16_t *str) |
Calculate the length (in characters) of a UTF-16 character array. More... | |
static char16_t * | copy (char16_t *dest, const char16_t *src, uint_t n) |
Copy at most n unicode characters from one UTF-16 character array to another. More... | |
static char16_t * | copyRaw (char16_t *dest, const char16_t *src, uint_t n) |
Copy exactly n unicode characters from one UTF-16 character array to another, without regard for NUL characters. More... | |
static int32_t | toLong (const char16_t *str, int base=10) |
Parse a 32-bit integer value from a UTF-16 character array. More... | |
static uint32_t | toULong (const char16_t *str, int base=10) |
Parse an unsigned 32-bit integer value from a UTF-16 character array. More... | |
static int64_t | toLongLong (const char16_t *str, int base=10) |
Parse a 64-bit integer value from a UTF-16 character array. More... | |
static uint64_t | toULongLong (const char16_t *str, int base=10) |
Parse an unsigned 64-bit integer value from a UTF-16 character array. More... | |
static float | toFloat (const char16_t *str) |
Parse a floating point value from a UTF-16 character array. More... | |
static double | toDouble (const char16_t *str) |
Parse a double-precision floating point value from a UTF-16 character array. More... | |
Static Public Attributes | |
static const uint_t | END = ~0 |
A pseudo-index indicating the end of a UTF-16 character array. More... | |
static const char16_t | TRUE_REP [] |
static const char16_t | FALSE_REP [] |
static const char16_t | DIGITS [] |
UTF-16 character array operations.
Unless stated otherwise, all methods assume that UTF-16 character array arguments are NUL-terminated.
Compare two UTF-16 character arrays.
a | The first array. |
b | The second array. |
ignoreCase | Whether the comparison should be case-insensitive. |
Compare two UTF-16 characters.
a | The first character. |
b | The second character. |
ignoreCase | Whether the comparison should be case-insensitive. |
Compare two UTF-16 character arrays.
a | The first character. |
b | The second character. |
n | The number of characters to compare. |
ignoreCase | Whether the comparison should be case-insensitive. |
Copy at most n unicode characters from one UTF-16 character array to another.
dest | The destination array. |
src | The sourcde array. |
n | The maximum number of unicode characters to copy. |
Copy exactly n unicode characters from one UTF-16 character array to another, without regard for NUL characters.
dest | The destination array. |
src | The sourcde array. |
n | The exact number of unicode characters to copy. |
Find a UTF-16 character in a UTF-16 character array.
str | The array to search. |
c | The character to find. |
len | The length of the array to search. |
Find a UTF-16 character in a UTF-16 character array.
str | The array to search. |
c | The character to find. |
len | The length of the array to search. |
Find a UTF-16 character sequence in a UTF-16 character array.
str | The array to search. |
s | The NUL-terminated character sequence to find. |
NULL
. Find a UTF-16 character sequence in a UTF-16 character array.
str | The array to search. |
s | The NUL-terminated character sequence to find. |
NULL
. Find the last occurrence of a UTF-16 character in a UTF-16 character array.
str | The array to search. |
c | The character to find. |
fromIndex | The end index from which to start the (reverse) search, or END to start from the end of the array. |
Find the last occurrence of a UTF-16 character in a UTF-16 character array.
str | The array to search. |
c | The character to find. |
fromIndex | The end index from which to start the (reverse) search, or END to start from the end of the array. |
|
static |
Find the last occurrence of a UTF-16 character sequence in a UTF-16 character* array.
str | The array to search. |
s | The character sequence to find. |
fromIndex | The end index from which to start the (reverse) search, or END to start from the end of the array. |
Find the last occurrence of a UTF-16 character sequence in a UTF-16 character* array.
str | The array to search. |
s | The character sequence to find. |
fromIndex | The end index from which to start the (reverse) search, or END to start from the end of the array. |
Calculate the length (in characters) of a UTF-16 character array.
str | The array. |
Move an array of UTF-16 characters to another, possibly overlapping array.
dest | The destination array. |
src | The source array. |
n | The number of characters to move. |
|
static |
Parse a double-precision floating point value from a UTF-16 character array.
str | The array to parse. |
|
static |
Parse a floating point value from a UTF-16 character array.
str | The array to parse. |
|
static |
Parse a 32-bit integer value from a UTF-16 character array.
str | The array to parse. |
base | The base of the numeric value. |
|
static |
Parse a 64-bit integer value from a UTF-16 character array.
str | The array to parse. |
base | The base of the numeric value. |
|
static |
Parse an unsigned 32-bit integer value from a UTF-16 character array.
str | The array to parse. |
base | The base of the numeric value. |
|
static |
Parse an unsigned 64-bit integer value from a UTF-16 character array.
str | The array to parse. |
base | The base of the numeric value. |
|
static |
|
static |
A pseudo-index indicating the end of a UTF-16 character array.
|
static |
|
static |