Internationalizing and Localizing Applications in Oracle Solaris

Exit Print View

Updated: July 2014
 
 

Wide-Character Strings

The following functions are used to handle wide-character strings:

wcslen(), wslen(), wcsnlen()

Get length of a fixed-sized wide-character string

wcschr(), wschr()

Find the first occurrence of a wide character in a wide-character string

wcsrchr(), wsrchr()

Find the last occurrence of a wide character in a wide-character string

wcspbrk()

Scan a wide-character string for a wide-character code

wcscat(), wscat(), wcsncat()

Concatenate two wide-character strings

wcscmp(), wscmp(), wcsncmp()

Compare two wide-character strings

wcscpy(), wscpy()

Copy a wide-character string

wcsncpy(), wsncpy()

Copy part of a wide-character string

wcpcpy(), wcpncpy()

Copy a wide-character string, returning a pointer to its end

wcsspn(), wsspn()

Get the length of a wide-character substring

wcscspn(), wscspn

Get the length of a complementary wide-character substring

wcstok(), wstok()

Split a wide-character string into tokens

wcsstr(), wscwcs()

Find a wide-character substring

wcwidth(), wcswidth(), wscol()

Get the number of column positions of a wide-character or wide-character string

wscasecmp(), wsncasecmp()

Case-insensitive wide-character string comparison

wcsdup(), wsdup()

Duplicate a wide-character string

The wcswcs() function was marked legacy and may be removed from the ISO/IEC 9899 standard in the future. Use wcsstr() function instead.

The functions for converting wide characters to numbers are as follows:

wcstol(), wstol(), wcstoll(), watol(), watoll(), watoi()

Convert a wide-character string to a long integer.

wcstoul(),wcstoull()

Convert a wide-character string to an unsigned long integer

wcstod(),wstod(), wcstof(), wcstold(), watof()

Convert a wide-character string to a floating-point number

The following functions list the in-memory operations with wide characters. They are wide-character equivalents of functions like memset(), memcpy(), and so on. These functions are not affected by the locale and all wchar_t values are treated identically.

wmemset()

Set wide characters in memory

wmemcpy()

Copy wide characters in memory

wmemmove()

Copy wide characters in memory with overlapping areas

wmemcmp(3C)

Compare wide characters in memory

wmemchr(3C)

Find a wide character in memory