ANSI C compatible string routines
[UCS-2 Character/String API]
ANSI C compatible string routines correspond to string manupulation routines in the ANSI C standard.
More...Functions | |
| UCS2API ucs2char_t * | ucs2cat (ucs2char_t *dst, const ucs2char_t *src) |
| Concatenate two strings. | |
| UCS2API ucs2char_t * | ucs2chr (const ucs2char_t *str, ucs2char_t c) |
| Search for the first occurrence of a character in a string. | |
| UCS2API int | ucs2cmp (const ucs2char_t *x, const ucs2char_t *y) |
| Compare two strings. | |
| UCS2API ucs2char_t * | ucs2cpy (ucs2char_t *dst, const ucs2char_t *src) |
| Copy a string. | |
| UCS2API size_t | ucs2cspn (const ucs2char_t *str, const ucs2char_t *charset) |
| Count the number of characters not appearing in a character set. | |
| UCS2API size_t | ucs2len (const ucs2char_t *str) |
| Count the length of a string. | |
| UCS2API ucs2char_t * | ucs2ncat (ucs2char_t *dst, const ucs2char_t *src, size_t n) |
| Concatenate two strings (no more than the maximum length). | |
| UCS2API int | ucs2ncmp (const ucs2char_t *x, const ucs2char_t *y, size_t n) |
| Compare two strings (no longer than the maximum length). | |
| UCS2API ucs2char_t * | ucs2ncpy (ucs2char_t *dst, const ucs2char_t *src, size_t n) |
| Copy a string (no more than the maximum length). | |
| UCS2API ucs2char_t * | ucs2pbrk (const ucs2char_t *str, const ucs2char_t *charset) |
| Find a character in a string that belongs to a character set. | |
| UCS2API ucs2char_t * | ucs2rchr (const ucs2char_t *str, ucs2char_t c) |
| Search for the last occurrence of a character in a string. | |
| UCS2API size_t | ucs2spn (const ucs2char_t *str, const ucs2char_t *charset) |
| Find a character in a string that does not belong to a character set. | |
| UCS2API ucs2char_t * | ucs2str (const ucs2char_t *str, const ucs2char_t *substr) |
| Find a substring in a string. | |
Detailed Description
ANSI C compatible string routines correspond to string manupulation routines in the ANSI C standard.The following ANSI C functions are not defined in this API subset: strcoll, strerror, strtok, strxfrm.
Function Documentation
| UCS2API ucs2char_t* ucs2cat | ( | ucs2char_t * | dst, | |
| const ucs2char_t * | src | |||
| ) |
Concatenate two strings.
- Parameters:
-
dst The pointer to the destination of a string. src The pointer to the source of a string.
- Return values:
-
ucs2char_t* The pointer to the destination string.
| UCS2API ucs2char_t* ucs2chr | ( | const ucs2char_t * | str, | |
| ucs2char_t | c | |||
| ) |
Search for the first occurrence of a character in a string.
- Parameters:
-
str The pointer to the string in which cis searched.c The target character.
- Return values:
-
ucs2char_t* The pointer to the character cinstr, orNULLifcdoes not occur instr.
| UCS2API int ucs2cmp | ( | const ucs2char_t * | x, | |
| const ucs2char_t * | y | |||
| ) |
Compare two strings.
- Parameters:
-
x The pointer to a string. y The pointer to another string.
- Return values:
-
int A positive value if xis greater thany; a negative value ifxis smaller thany; zero ifxis identical toy.
| UCS2API ucs2char_t* ucs2cpy | ( | ucs2char_t * | dst, | |
| const ucs2char_t * | src | |||
| ) |
Copy a string.
- Parameters:
-
dst The pointer to the destination of a string. src The pointer to the source of a string.
- Return values:
-
ucs2char_t* The pointer to the destination string.
| UCS2API size_t ucs2cspn | ( | const ucs2char_t * | str, | |
| const ucs2char_t * | charset | |||
| ) |
Count the number of characters not appearing in a character set.
- Parameters:
-
str The pointer to a string. charset The pointer to a character set.
- Return values:
-
size_t The number of characters from the beginning of strin which any character incharsetappear for the first time, or the length ofstrif such a character does not exist.
| UCS2API size_t ucs2len | ( | const ucs2char_t * | str | ) |
Count the length of a string.
- Parameters:
-
str The pointer to a string.
- Return values:
-
size_t The number of characters in str.
| UCS2API ucs2char_t* ucs2ncat | ( | ucs2char_t * | dst, | |
| const ucs2char_t * | src, | |||
| size_t | n | |||
| ) |
Concatenate two strings (no more than the maximum length).
- Parameters:
-
dst The pointer to the destination of a string. src The pointer to the source of a string. n The number of characters to be concatenated.
- Return values:
-
ucs2char_t* The pointer to the destination string.
| UCS2API int ucs2ncmp | ( | const ucs2char_t * | x, | |
| const ucs2char_t * | y, | |||
| size_t | n | |||
| ) |
Compare two strings (no longer than the maximum length).
- Parameters:
-
x The pointer to a string. y The pointer to another string. n The number of characters to be compared.
- Return values:
-
int A positive value if xis greater thany; a negative value ifxis smaller thany; zero ifxis identical toy.
| UCS2API ucs2char_t* ucs2ncpy | ( | ucs2char_t * | dst, | |
| const ucs2char_t * | src, | |||
| size_t | n | |||
| ) |
Copy a string (no more than the maximum length).
- Parameters:
-
dst The pointer to the destination of a string. src The pointer to the source of a string. n The number of characters to be copied.
- Return values:
-
ucs2char_t* The pointer to the destination string.
| UCS2API ucs2char_t* ucs2pbrk | ( | const ucs2char_t * | str, | |
| const ucs2char_t * | charset | |||
| ) |
Find a character in a string that belongs to a character set.
- Parameters:
-
str The pointer to the string where charsetis searched.charset The pointer to a character set.
- Return values:
-
ucs2char_t* The pointer to the character in strthat belongs tocharset, orNULLif such a character does not exist.
| UCS2API ucs2char_t* ucs2rchr | ( | const ucs2char_t * | str, | |
| ucs2char_t | c | |||
| ) |
Search for the last occurrence of a character in a string.
- Parameters:
-
str The pointer to the string in which cis searched.c The target character.
- Return values:
-
ucs2char_t* The pointer to the character cinstr, orNULLifcdoes not occur instr.
| UCS2API size_t ucs2spn | ( | const ucs2char_t * | str, | |
| const ucs2char_t * | charset | |||
| ) |
Find a character in a string that does not belong to a character set.
- Parameters:
-
str The pointer to the string where charsetis searched.charset The pointer to a character set.
- Return values:
-
ucs2char_t* The pointer to the character in strthat does not belong tocharset, orNULLif such a character does not exist.
| UCS2API ucs2char_t* ucs2str | ( | const ucs2char_t * | str, | |
| const ucs2char_t * | substr | |||
| ) |
Find a substring in a string.
- Parameters:
-
str The pointer to the string where substris searched.substr The pointer to the substring.
- Return values:
-
ucs2char_t* The pointer to the character where substrbegins instrfor the first time, orNULLifstrdoes not containsubstr.