TABLE OF CONTENTS
- trish2/wchar_utils
- trish2/wchar_duplicate
- trish2/get_nonls
- trish2/char2wcs
- trish2/tabs_and_nls
- trish2/ESCAPE_WCHAR
trish2/wchar_utils [ Modules ]
NAME
wchar_utils
SYNOPSIS
#include <wchar_utils.h>
DESCRIPTION
EXAMPLE
SEE ALSO
wchar_duplicate, get_nonls, char2wcs, tabs_and_nls, ESCAPE_WCHAR
trish2/wchar_duplicate [ Functions ]
NAME
wchar_duplicate
SYNOPSIS
#include <wchar_utils.h> wchar_t *wchar_duplicate(const wchar_t *src);
FUNCTION
wchar_duplicate does the same as wcsdup but it is C99 compliant.
INPUTS
- src : Source string.
RETURN VALUE
A pointer to a freshly allocated wide character string.
SEE ALSO
trish2/get_nonls [ Functions ]
NAME
get_nonls
SYNOPSIS
#include <wchar_utils.h> int get_nonls(wchar_t *s, size_t l);
FUNCTION
get_nonls counts the number of newline characters at the end of the wide character string s, of length l. If l is below 0, then get_nonls will compute the length of the string with wcslen. This function is useful to determine if the end of line is CR or CRLF.
INPUTS
- s : String to look in for end of lines.
- l : Length of s.
RETURN VALUE
1 if the string is CR, 2 if it is CRLF or 0 otherwise.
SEE ALSO
trish2/char2wcs [ Functions ]
NAME
char2wcs
SYNOPSIS
#include <wchar_utils.h> wchar_t *char2wcs(const char *s);
FUNCTION
char2wcs converts the multi-byte string s into a wide character string according to the current value of LC_CTYPE.
INPUTS
- s : Multi-byte string to convert.
RETURN VALUE
A pointer to a freshly allocated wide character string. NULL if s contains an illegal character sequence in the current locale.
SEE ALSO
trish2/tabs_and_nls [ Functions ]
NAME
tabs_and_nls
SYNOPSIS
* #include <wchar_utils.h> * size_t tabs_and_nls(wchar_t *w);
FUNCTION
tabs_and_nls operates an in-place replacement of all "\t" sequences by a tabulation, and all "\n" sequences by a newline in the wide character string w.
INPUTS
- w : Wide character string where to operate replacements.
RETURN VALUE
The length of the modified string.
SEE ALSO
trish2/ESCAPE_WCHAR [ Definitions ]
[ Top ] [ Definitions ]
NAME
ESCAPE_WCHAR
SYNOPSIS
#include <patricia_node.h> #define ESCAPE_WCHAR L'\\'
SEE ALSO