*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> wcstring (3s)              
Title
Content
Arch
Section
 

Contents


wcstring(3S)							  wcstring(3S)


NAME    [Toc]    [Back]

     wcstring: wcscat, wscat, wcsncat, wsncat, wcscmp, wscmp, wcsncmp, wsncmp,
     wcscoll, wcscpy, wscpy, wcsncpy, wsncpy, wcslen, wslen, wcschr, wschr,
     wcsrchr, wsrchr, wcspbrk, wspbrk, wcsspn, wsspn, wscspn, wcstok, wstostr,
     wcswcs, wcswidth, wcwidth	-  wchar_t string operations and type
     transformation

SYNOPSIS    [Toc]    [Back]

     #include <wchar.h>

     wchar_t *wcscat(wchar_t *s1<b>, const	wchar_t	*s2<b>);
     wchar_t *wscat(wchar_t *s1<b>, wchar_t *s2<b>);

     wchar_t *wcsncat(wchar_t *s1<b>, const wchar_t *s2<b>, size_t n<b>);
     wchar_t *wsncat(wchar_t *s1<b>, wchar_t *s2<b>, int n<b>);

     int wcscmp(wchar_t	*s1<b>, const wchar_t *s2<b>);
     int wscmp(wchar_t *s1<b>, wchar_t *s2<b>);

     int wcsncmp(const wchar_t *s1<b>, const wchar_t *s2<b>, size_t n<b>);
     int wsncmp(wchar_t	*s1<b>, wchar_t *s2<b>, int n<b>);

     int wcscoll(const wchar_t *s1<b>, const wchar_t *s2<b>);

     wchar_t *wcscpy(wchar_t *s1<b>, const	wchar_t	*s2<b>);
     wchar_t *wscpy(wchar_t *s1<b>, wchar_t *s2<b>);

     wchar_t *wcsncpy(wchar_t *s1<b>, const wchar_t *s2<b>, size_t n<b>);
     wchar_t *wsncpy(wchar_t *s1<b>, wchar_t *s2<b>, int n<b>);

     size_t wcslen(const wchar_t *s<b>);
     int wslen(wchar_t *s<b>);

     wchar_t *wcschr(const wchar_t *s<b>, wchar_t c<b>);
     wchar_t *wschr(wchar_t *s<b>,	int c<b>);

     wchar_t *wcsrchr(const wchar_t *s<b>,	int c<b>);
     wchar_t *wsrchr(wchar_t *s<b>, int c<b>);

     wchar_t *wcspbrk(const wchar_t *s1<b>, const wchar_t *s2<b>);
     wchar_t *wspbrk(wchar_t *s1<b>, wchar_t *s2<b>);

     int wcsspn(const wchar_t *s1<b>, const wchar_t *s2<b>);
     int wsspn(wchar_t *s1<b>, wchar_t *s2<b>);
     int wscspn(wchar_t	*s1<b>, wchar_t *s2<b>);

     wchar_t *wcstok(wchar_t *s1<b>, const	wchar_t	*s2<b>);

     char *wstostr(char	*s1<b>, wchar_t *s2<b>);

     wchar_t *wcswcs(const wchar_t *s1<b>,	const wchar_t *s2<b>);

     int wcswidth(const	wchar_t	*s<b>, size_t n<b>);


									Page 1






wcstring(3S)							  wcstring(3S)



     int wcwidth(wchar_t wc<b>);

DESCRIPTION (International Functions)    [Toc]    [Back]

     The arguments s1, s2, and s point to wchar_t strings (that	is, arrays of
     wchar_t characters	terminated by a	wchar_t	null character).  The
     functions wcscat, wscat, wcsncat, wsncat, wcscpy, wscpy, wcsncpy and
     wsncpy all	modify s1.  These functions do not check for an	overflow
     condition of the array pointed to by s1.

     wcscat and	wscat append a copy of the wchar_t string s2 to	the end	of the
     wchar_t string s1.	 wcsncat and wsncat append at most n <b>wchar_t
     characters.  Each function	returns	s1.

     wcscmp and	wscmp compare its arguments and	returns	an integer less	than,
     equal to, or greater than 0, depending on whether s1 is less than,	equal
     to, or greater than s2.  wcsncmp and wsncmp make the same comparison but
     look at most at n <b>wchar_t characters.

     wcscpy and	wscpy copy wchar_t string s2 to	s1, stopping after the wchar_t
     null character has	been copied.  wcsncpy and wsncpy copy exactly n
     wchar_t characters, truncating s2 or adding wchar_t null characters to
     s1, if necessary.	The result will	not be wchar_t null-terminated if the
     length of s2 is n or more.	 Each function returns s1.

     wcslen and	wslen return the number	of wchar_t characters in s, not
     including the terminating wchar_t null character.

     wcschr, wschr, wcsrchr and	wsrchr return a	pointer	to the first and last
     occurrence, respectively, of wchar_t character c in wchar_t string	s, or
     a null pointer, if	c does not occur in the	string.	 The wchar_t null
     character terminating a string is considered to be	part of	the string.

     wcspbrk and wspbrk	return a pointer to the	first occurrence in wchar_t
     string s1 of any wchar_t character	from wchar_t string s2,	or a null
     pointer if	there is no wchar_t character from s2 in s1.

     wcsspn and	wsspn return the length	of the initial segment of wchar_t
     string s1,	which consists entirely	of wchar_t characters from wchar_t
     string s2.	 wscspn	returns	the length of the initial segment of wchar_t
     string s1,	which does not consist entirely	of wchar_t characters from
     wchar_t string s2.

     wcstok treats the wchar_t string s1 as a sequence of zero or more text
     tokens, separated by spans	of one or more wchar_t characters from the
     separator wchar_t string s2.  The first call (with	the pointer s1
     specified)	returns	a pointer to the first wchar_t character of the	first
     token, and	writes a wchar_t null character	into s1	immediately following
     the returned token.  The function keeps track of its position in the
     wchar_t string between separate calls, so that subsequent calls (which
     must be made with the first argument a null pointer) will progress
     through the wchar_t string	s1 immediately following that token.
     Similarly,	subsequent calls will progress through the wchar_t string s1



									Page 2






wcstring(3S)							  wcstring(3S)



     until no tokens remain.  The wchar_t separator string s2 may be different
     from call to call.	 A null	pointer	is returned when no token remains in
     s1.

     wstostr transforms	wchar_t	characters in wchar_t string s2	into EUC, and
     transfers them to character string	s1, stopping after the wchar_t null
     character has been	processed.

     wcscoll compares the wide character string	pointed	to by s1 to the	wide
     character string pointed to by s2,	both interpreted as appropriate	to the
     LC_COLLATE	category of the	current	locale.	 Upon successful completion,
     wcscoll returns an	integer	greater	than, equal to or less than zero,
     according to whether the wide character string pointed to by s1 is
     greater than, equal to or less than the wide character string pointed to
     by	s2, when both are interpreted as appropriate to	the current locale.
     On	error, wcscoll may set errno, but no return value is reserved to
     indicate an error.	 If errno is set to EINVAL, then the s1	or s2
     arguments contain wide character codes outside the	domain of the
     collating sequence.

     wcswcs locates the	first occurrence in the	wide character string pointed
     to	by s1 of the sequence of wide-character	codes (excluding the
     terminating null wide-character code) in the wide character string
     pointed to	by s2.	Upon successful	completion, wcswcs returns a pointer
     to	the located wide character string or a null pointer if the wide
     character string is not found.  If	s2 points to a wide character string
     with zero length, the function returns s1.

     wcswidth determines the number of column positions	required for n widecharacter
 codes (or fewer than n wide-character codes if a	null widecharacter
 code is encountered before n wide-character codes are
     exhausted)	in the string pointed to by s.	wcswidth either	returns	0 (if
     s points to a null	wide-character code), or returns the number of column
     positions to be occupied by the wide character string pointed to by s, or
     returns -1	(if any	of the first n wide-character codes in the wide
     character string pointed to by s is not a printing	wide-character code).

     wcwidth determines	the number of column positions required	for the	wide
     character wc.  The	value of wc must be a character	representable as a
     wchar_t, and must be a wide-character code	corresponding to a valid
     character in the current locale.  wcwidth either returns 0	(if wc is a
     null wide-character code),	or returns the number of column	positions to
     be	occupied by the	wide-character code wc,	or returns -1 (if wc does not
     correspond	to a prinable wide-character code).

SEE ALSO    [Toc]    [Back]

      
      
     malloc(3C), widec(3S), malloc(3X).

DIAGNOSTICS    [Toc]    [Back]

     On	success, wstostr returns s1.  If an illegal byte sequence is detected,
     a null pointer is returned	and errno is set to EILSEQ.


									PPPPaaaaggggeeee 3333
[ Back ]
 Similar pages
Name OS Title
strxfrm IRIX string transformation
strxfrm Linux string transformation
fold_string_w Tru64 maps one wide-character string to another, performing the specified Unicode character transformation
XmStringGetNextComponent IRIX A compound string function that returns the type and value of the next component in a compound string
XmStringGetNextComponent HP-UX A compound string function that returns the type and value of the next component in a compound string
ldgetsymstr IRIX get a symbol type string
XmString IRIX Data type for a compound string
XmString HP-UX Data type for a compound string
XmString Tru64 Data type for a compound string
XmStringDirection HP-UX Data type for the direction of display in a string
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service