Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wcsxfrm(3) [freebsd man page]

WCSXFRM(3)						   BSD Library Functions Manual 						WCSXFRM(3)

NAME
wcsxfrm -- transform a wide string under locale LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <wchar.h> size_t wcsxfrm(wchar_t * restrict dst, const wchar_t * restrict src, size_t n); DESCRIPTION
The wcsxfrm() function transforms a null-terminated wide character string pointed to by src according to the current locale collation order then copies the transformed string into dst. No more than n wide characters are copied into dst, including the terminating null character added. If n is set to 0 (it helps to determine an actual size needed for transformation), dst is permitted to be a NULL pointer. Comparing two strings using wcscmp() after wcsxfrm() is equivalent to comparing two original strings with wcscoll(). RETURN VALUES
Upon successful completion, wcsxfrm() returns the length of the transformed string not including the terminating null character. If this value is n or more, the contents of dst are indeterminate. SEE ALSO
setlocale(3), strxfrm(3), wcscmp(3), wcscoll(3) STANDARDS
The wcsxfrm() function conforms to ISO/IEC 9899:1999 (``ISO C99''). BUGS
The current implementation of wcsxfrm() only works in single-byte LC_CTYPE locales, and falls back to using wcsncpy() in locales with extended character sets. Comparing two strings using wcscmp() after wcsxfrm() is not always equivalent to comparison with wcscoll(); wcsxfrm() only stores information about primary collation weights into dst, whereas wcscoll() compares characters using both primary and secondary weights. BSD
October 4, 2002 BSD

Check Out this Related Man Page

WCSXFRM(3)						   BSD Library Functions Manual 						WCSXFRM(3)

NAME
wcsxfrm, wcsxfrm_l -- transform a wide string under locale LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <wchar.h> size_t wcsxfrm(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n); #include <wchar.h> #include <xlocale.h> size_t wcsxfrm_l(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n, locale_t loc); DESCRIPTION
The wcsxfrm() function transforms a null-terminated wide character string pointed to by ws2, according to the current locale's collation order, then copies the transformed string into ws1. No more than n wide characters are copied into ws1, including the terminating null char- acter. If n is set to 0 (it helps to determine an actual size needed for transformation), ws1 is permitted to be a NULL pointer. Comparing two strings using wcscmp() after wcsxfrm() is equivalent to comparing two original strings with wcscoll(). Although the wcsxfrm() function uses the current locale, the wcsxfrm_l() function may be passed a locale directly. See xlocale(3) for more information. RETURN VALUES
Upon successful completion, wcsxfrm() returns the length of the transformed string not including the terminating null character. If this value is n or more, the contents of ws1 are indeterminate. SEE ALSO
setlocale(3), strxfrm(3), wcscmp(3), wcscoll(3), xlocale(3) STANDARDS
The wcsxfrm() function conforms to ISO/IEC 9899:1999 (``ISO C99''). BUGS
The current implementation of wcsxfrm() only works in single-byte LC_CTYPE locales, and falls back to using wcsncpy() in locales with extended character sets. Comparing two strings using wcscmp() after wcsxfrm() is not always equivalent to comparison with wcscoll(); wcsxfrm() only stores information about primary collation weights into ws1, whereas wcscoll() compares characters using both primary and secondary weights. BSD
October 4, 2002 BSD
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Comparing strings

I have two strings a=Mar22 b=may21 how can I compare them Is this fine if then; . ... else .... fi or if then (2 Replies)
Discussion started by: yakyaj
2 Replies

2. Shell Programming and Scripting

Comparing strings using nawk

Hello All Please I have got a file called DATE.tex which consist of 01-04-2008_12:00:00 01-04-2005_12:00:00 01-04-2003_12:00:00 01-04-2007_12:00:00 01-04-2002_12:00:00 01-04-2009_12:00:00 I want to use nawk to print out the dates >=01-04-2009_12:00:00 I tried this cat plnt.new |... (6 Replies)
Discussion started by: ganiel24
6 Replies

3. UNIX for Dummies Questions & Answers

Comparing the characters of 2 variables

hi i am writing a hangman script and am having trouble checking the correct letters against the word i need the script to compare the word against the letters guessed that are correct so once all the letters within the word have been guessed it will alow me to create a wining senario eg ... (13 Replies)
Discussion started by: lsecer
13 Replies

4. Shell Programming and Scripting

Comparing Integers (I think)

Hi, I can't figure out what I'm missing. I'm running a query to see if there are any streams recording on my DVR before starting a scripted update. I'm guessing that it is viewing $VIDEO as a string instead of an int. I've tried everything I saw on google but it still comes back as $VIDEO is... (8 Replies)
Discussion started by: Rhysers
8 Replies