libwchar2 0.0.10
|
#include <wctype.h>
#include <wchar.h>
Go to the source code of this file.
Data Structures | |
struct | string_ws |
Base wide string structure. More... | |
struct | _wdirent |
the contains constructs that facilitate directory traversing More... | |
Macros | |
#define | USED_WCHAR2LIB 1 |
Define this flag for other software, indicate enable libwchar2 in you project. More... | |
#define | __WS(x) __WS_(x) |
static string to wide type macro | |
#define | __WSTR wchar_t |
definition wchar_t string macro | |
#define | __WSTRFREE __attribute__((cleanup(__wsfree))) __WSTR |
auto free wchar_t string macro | |
#define | __WSTR_FMT "ls" |
print format wchar_t string macro | |
#define | __WCHR_FMT "lc" |
print format wchar_t char macro | |
#define | __WCSZ(x) ((x->sz + 1) * sizeof(wchar_t)) |
determine size string_ws macro | |
#define | wstring_appends(A, ...) wstring_appends_(A,__VA_ARGS__,NULL) |
Macro to function wstring_appends_, see notes. | |
#define | wreaddir_cb_opt(opt, val) ((opt) | (1L << (val))) |
Macro to set options value to function _wreaddir_cb. More... | |
#define | wstocscvt(A, B, D) |
wchar_t* type to char[] A char[] - array name B wchar_t* - source D - function return value if error More... | |
#define | wstocsncvt(A, B, C, D) |
wchar_t* type to char[] with size A char[] - array name B wchar_t* - source C size_t - wchar_t* size D - function return value if error More... | |
#define | wstrtocscvt(A, B, D) |
string_ws type to char[] this struct defined on top of this file A char[] - array name B string_ws* - source D - function return value if error More... | |
Typedefs | |
typedef unsigned long long int | uintmax_t |
typedef long long int | intmax_t |
typedef struct _wdirent | wdirent_t |
the contains constructs that facilitate directory traversing | |
typedef void | WDIR_t |
Main structure directory traversing, reference to void | |
typedef void(* | wdir_cb) (unsigned int, access_e, long long, string_ws *, void *) |
CallBack for _wreaddir_cb. More... | |
typedef void(* | split_cb) (wchar_t *, size_t, long, void *) |
CallBack for wstring_split_cb. More... | |
Enumerations | |
enum | access_e { ISERR = -1, ISUNK = 0, ISFIL = 1, ISLNK = 2, ISDIR = 3, ISCHR = 4, ISBLK = 5, ISSOCK = 6, ISFIFO = 7, ISWHT = 8, DIRNODIR = 9, DIRNOROOT = 10, DIRENTRYSIZE = 11 } |
enumeration for return waccess function More... | |
Functions | |
const char * | wchar2version (void) |
Library current version. | |
wchar_t | _towupper (wchar_t) |
Translate wide characters to uppercase. More... | |
wchar_t | _towlower (wchar_t) |
Translate wide characters to lowercase. More... | |
wchar_t | _towctrans (wchar_t, wctrans_t) |
Extensible wide-character translation. More... | |
wctype_t | _wctype (const char *) |
Compute wide-character test type. More... | |
wctrans_t | _wctrans (const char *) |
Compute wide-character translation type. More... | |
int | _wcwidth (wchar_t) |
Number of column positions of a wide-character code. More... | |
int | _wcswidth (const wchar_t *, size_t) |
Number of column positions of a wide-character string. More... | |
int | _iswctype (wchar_t, wctype_t) |
Extensible wide-character test, wide-character classification. More... | |
int | _iswxdigit (wchar_t) |
Test for hexadecimal digit wide character. More... | |
int | _iswupper (wchar_t) |
Test for uppercase wide character. More... | |
int | _iswspace (wchar_t) |
Test for whitespace wide character. More... | |
int | _iswpunct (wchar_t) |
Test for punctuation or symbolic wide character. More... | |
int | _iswprint (wchar_t) |
Test for printing wide character. More... | |
int | _iswlower (wchar_t) |
Test for lowercase wide character. More... | |
int | _iswgraph (wchar_t) |
Test for graphic wide character. More... | |
int | _iswdigit (wchar_t) |
Test for decimal digit wide character. More... | |
int | _iswcntrl (wchar_t) |
Test for control wide character. More... | |
int | _iswblank (wchar_t) |
Test for whitespace wide character. More... | |
int | _iswalpha (wchar_t) |
Test for whitespace wide character, alphabetic wide character predicate. More... | |
int | _iswalnum (wchar_t) |
Test for alphanumeric wide character, alphabetic wide character predicate. More... | |
double | _wcstod (const wchar_t *, wchar_t **) |
Convert wide character ASCII string to double number. More... | |
float | _wcstof (const wchar_t *, wchar_t **) |
Convert wide character ASCII string to float number. More... | |
long double | _wcstold (const wchar_t *, wchar_t **) |
Convert wide character ASCII string to long double number. More... | |
long int | _wcstol (const wchar_t *, wchar_t **, int) |
Convert wide character ASCII string to long int number. More... | |
long long int | _wcstoll (const wchar_t *, wchar_t **, int) |
Convert wide character ASCII string to long long int number. More... | |
unsigned long int | _wcstoul (const wchar_t *, wchar_t **, int) |
Convert wide character ASCII string to unsigned long int number. More... | |
unsigned long long int | _wcstoull (const wchar_t *, wchar_t **, int) |
Convert wide character ASCII string to unsigned long long int number. More... | |
intmax_t | _wcstoimax (const wchar_t *, wchar_t **, int) |
Convert wide character ASCII string to intmax_t integer. More... | |
uintmax_t | _wcstoumax (const wchar_t *, wchar_t **, int) |
Convert wide character ASCII string to uintmax_t integer. More... | |
size_t | _wcstombs (char *restrict, const wchar_t *restrict, size_t) |
Minimal wide string to multibyte string converter. More... | |
size_t | _wcstombs_s (char *restrict, const wchar_t *restrict, size_t) |
Minimal wide string to multibyte string converter + double size out buffer. More... | |
size_t | _wcsrtombs (char *restrict, const wchar_t **restrict, size_t, mbstate_t *restrict) |
Convert a wide-character string to a character string. More... | |
size_t | _wcrtomb (char *restrict, wchar_t, mbstate_t *restrict) |
Convert wide character to multibyte sequence. More... | |
size_t | _mbstowcs (wchar_t *restrict, const char *restrict, size_t) |
Minimal multibyte string to wide string converter. More... | |
size_t | _mbsrtowcs (wchar_t *restrict, const char **restrict, size_t, mbstate_t *restrict) |
Convert a character string to a wide-character string. More... | |
size_t | _wcsnrtombs (char *restrict, const wchar_t **restrict, size_t, size_t, mbstate_t *restrict) |
Convert a wide-character string to a character string. More... | |
size_t | _mbsnrtowcs (wchar_t *restrict, const char **restrict, size_t, size_t, mbstate_t *restrict) |
Convert a character string to a wide-character string. More... | |
size_t | _mbrtowc (wchar_t *restrict, const char *restrict src, size_t, mbstate_t *restrict) |
Converts a narrow multibyte character to a wide character. More... | |
size_t | _mbrlen (const char *restrict, size_t, mbstate_t *restrict) |
Get length of multibyte character. More... | |
int | _mblen (const char *, size_t) |
Determines the size, in bytes, of the multibyte character whose first byte is pointed. More... | |
int | _mbsinit (const mbstate_t *) |
Check if initial conversion state. More... | |
int | _mbtowc (wchar_t *restrict, const char *restrict, size_t) |
Minimal multibyte to wide char converter. More... | |
int | _wctomb (char *, wchar_t) |
Minimal wide char to multibyte converter. More... | |
int | _wctob (wchar_t) |
Convert wide character to single byte. More... | |
wchar_t | _btowc (int) |
Convert single byte character to wide character. More... | |
void | wcprint (wchar_t *) |
wchar_t* print This function to test variably only! Instead use _vfprintf, _vfwprintf, _fprintf, _fwprintf More... | |
int | wcstocscmp (const char *, wchar_t *, size_t) |
compare char* <-> wchar_t* This function quick compare only ASCII range, NOT all Unicode symbols support! size_t - wchar_t* size return - boolean | |
wchar_t * | wcsregexp (wchar_t *restrict, wchar_t *restrict, int *) |
wcsregexp - Matches a regular expression More... | |
size_t | u8stowcs (wchar_t *, const char *) |
Covert utf-8 char* to wchar_t* More... | |
size_t | wcstou8s (char *, const wchar_t *) |
Convert wchar_t* to utf-8 char* More... | |
int | u8sverify (const char *) |
Verify char* to utf-8 valid string. More... | |
wchar_t * | _wcpcpy (wchar_t *, const wchar_t *) |
Copy a wide-character string returning a pointer to its end. More... | |
wchar_t * | _wcpncpy (wchar_t *, const wchar_t *, size_t) |
Copy part of a wide-character string returning a pointer to its end. More... | |
wchar_t * | _wcscat (wchar_t *, const wchar_t *) |
Concatenate wide-character strings. More... | |
wchar_t * | _wcsncat (wchar_t *, const wchar_t *, size_t) |
Concatenate wide-character strings with size. More... | |
wchar_t * | _wcsncpy (wchar_t *, const wchar_t *, size_t) |
Counted copy wide-character string. More... | |
wchar_t * | _wcspbrk (const wchar_t *, const wchar_t *) |
Find wide characters in string. More... | |
wchar_t * | _wcschr (const wchar_t *, wchar_t) |
Search for wide character in string. More... | |
wchar_t * | _wcsrchr (const wchar_t *, wchar_t) |
Reverse search for wide character in string. More... | |
wchar_t * | _wcsstr (const wchar_t *, const wchar_t *) |
Find wide-character string segment. More... | |
wchar_t * | _wcstok (wchar_t *, const wchar_t *, wchar_t **) |
Tokenize wide-character string. More... | |
wchar_t * | _wmemchr (const wchar_t *, wchar_t, size_t) |
Find wide character in memory. More... | |
wchar_t * | _wmemcpy (wchar_t *, const wchar_t *, size_t) |
Copy wide characters in memory. More... | |
wchar_t * | _wmemmove (wchar_t *, const wchar_t *, size_t) |
Copy wide characters in memory with overlapping areas. More... | |
wchar_t * | _wmemset (wchar_t *, wchar_t, size_t) |
Set wide characters in memory. More... | |
size_t | _wcslcat (wchar_t *, const wchar_t *, size_t) |
Concatenate wide-character strings to specified length. | |
size_t | _wcslcpy (wchar_t *, const wchar_t *, size_t) |
Copy wide-character string to specified length. | |
size_t | _wcslen (const wchar_t *) |
Wide-character string length. More... | |
size_t | _wcsnlen (const wchar_t *, size_t) |
Wide-character string length with maximum limit. More... | |
size_t | _wcsspn (const wchar_t *, const wchar_t *) |
Find initial match in wide-character string. More... | |
int | _wcscasecmp (const wchar_t *, const wchar_t *) |
Case-insensitive wide character string compare. More... | |
int | _wcsncasecmp (const wchar_t *, const wchar_t *, size_t) |
Case-insensitive wide character string compare with size. More... | |
int | _wcscmp (const wchar_t *, const wchar_t *) |
Wide-character string compare. More... | |
int | _wcsncmp (const wchar_t *, const wchar_t *, size_t) |
Wide-character string compare. More... | |
int | _wmemcmp (const wchar_t *, const wchar_t *, size_t) |
Compare wide characters in memory. More... | |
int | _vfprintf (FILE *restrict, const char *restrict, va_list) |
Write to stream char format variable argument list. | |
int | _vsnprintf (char *restrict, size_t, const char *restrict, va_list) |
Write formatted data from variable argument list to sized buffer. | |
int | _fprintf (FILE *restrict, const char *restrict,...) |
Write to stream char format variable arguments. | |
int | _printf (const char *restrict fmt,...) |
Write to stdout char format variable arguments. | |
int | _snprintf (char *restrict, size_t, const char *restrict,...) |
Format variable arguments list. | |
int | _vfwprintf (FILE *restrict, const wchar_t *restrict, va_list) |
Write to stream wide character format variable argument list. More... | |
int | _vswprintf (wchar_t *restrict, size_t, const wchar_t *restrict, va_list) |
Write formatted data from variable argument list to sized buffer. More... | |
int | _fwprintf (FILE *restrict, const wchar_t *restrict,...) |
Write to stream wide character format variable arguments. More... | |
int | _swprintf (wchar_t *restrict, size_t, const wchar_t *restrict,...) |
Write formatted wide character output. More... | |
int | _wprintf (const wchar_t *restrict fmt,...) |
Write a formatted wide character string to 'stdout'. More... | |
int | _fputws (const wchar_t *restrict, FILE *restrict) |
Write a wide character string to a file or stream. More... | |
wchar_t | _fputwc (wchar_t, FILE *restrict) |
Write a wide character to a file or stream. More... | |
size_t | _wcsftime (wchar_t *restrict, size_t sz, const wchar_t *restrict, const void *restrict) |
Convert date and time to a formatted wide-character string. More... | |
wchar_t * | _wcsptime (const wchar_t *, const wchar_t *, void *) |
Convert a wide-character string representation of time to a time tm structure. More... | |
FILE * | _wfopen (const wchar_t *, const wchar_t *) |
Open the stream for the file, takes as the first parameter the file name and the second parameter the opening mode in the form of wide characters. More... | |
FILE * | _wfopen_s (const wchar_t *, size_t, const wchar_t *) |
The same as _wfopen, the size_t parameter must contain the length of the variable of the file name, or zero. More... | |
FILE * | _wfopen_ws (const string_ws *, const wchar_t *) |
The same as _wfopen, the input parameter filename is passed in the string_ws structure. More... | |
FILE * | _wfopen_selector (int, const void *, size_t, const void *) |
Automatic type selector for wfopen* functions. More... | |
FILE * | u8wfopen (const wchar_t *, const wchar_t *) |
Open file stream, after converting the file name from wide characters to UTF-8. More... | |
int | _wstat (const wchar_t *, void *) |
Functions wstat*() fill the structure with data about the file pointed to by struct stat , associated with the file name. More... | |
int | _wstat_s (const wchar_t *, size_t, void *) |
The same as _wstat, the size_t parameter must contain the length of the variable of the file name, or zero. More... | |
int | _wstat_ws (const string_ws *, void *) |
The same as _wstat, the input parameter filename is passed in the string_ws structure. More... | |
int | _wstat_selector (int, const void *, size_t, const void *) |
Automatic type selector for wstat* functions. More... | |
int | u8wstat (const wchar_t *, void *) |
Get file statistics by first converting the file name from wide characters to UTF-8. More... | |
int | _wrename (const wchar_t *, const wchar_t *) |
The wrename() function changes the file name to a new one. More... | |
int | _wrename_s (const wchar_t *, size_t, const wchar_t *, size_t) |
The same as _wrename, the size_t parameter must contain the length of the variable of the file name, or zero. More... | |
int | _wrename_ws (const string_ws *, const string_ws *) |
The same as _wrename, the input parameter filename is passed in the string_ws structure. More... | |
int | _wrename_selector (int, const void *, size_t, const void *, size_t) |
Automatic type selector for wrename* functions. More... | |
int | u8wrename (const wchar_t *, const wchar_t *) |
Rename file, after converting the file name from wide characters to UTF-8. More... | |
int | _wremove (const wchar_t *) |
The wremove*() function deletes a name from the file system. More... | |
int | _wremove_s (const wchar_t *, size_t) |
The same as _wremove, the size_t parameter must contain the length of the variable of the file name, or zero. More... | |
int | _wremove_ws (const string_ws *) |
The same as _wremove, the input parameter filename is passed in the string_ws structure. More... | |
int | _wremove_selector (int, const void *, size_t) |
Automatic type selector for wremove* functions. More... | |
int | u8wremove (const wchar_t *) |
Delete (remove) file or directory, after converting the file name from wide characters to UTF-8. More... | |
int | _wmkdir (const wchar_t *, mode_t) |
Creates a directory or a chain of directories specified in the path. More... | |
int | _wmkdir_s (const wchar_t *, size_t, mode_t) |
The same as _wmkdir, the size_t parameter must contain the length of the variable of the file name, or zero. More... | |
int | _wmkdir_ws (const string_ws *, mode_t) |
The same as _wmkdir, the input parameter filename is passed in the string_ws structure. More... | |
int | _wmkdir_selector (int, const void *, size_t, mode_t) |
Automatic type selector for wmkdir* functions. More... | |
int | u8wmkdir (const wchar_t *, mode_t) |
Creates a directory or a chain of directories specified in the path, after converting the file name from wide characters to UTF-8. More... | |
access_e | _waccess (const wchar_t *, int) |
Check permissions for a file or directory, wide char input. More... | |
access_e | _waccess_s (const wchar_t *, size_t, int) |
Check permissions for a file or directory, wide char input with size. | |
access_e | _waccess_ws (const string_ws *, int) |
Check permissions for a file or directory, struct string_ws input. | |
access_e | _waccess_selector (int, const void *, size_t, int) |
Automatic type selector for wmkdir* functions. | |
access_e | u8waccess (const wchar_t *, int) |
Check permissions for a file or directory, convert file name from wide characters to UTF-8. More... | |
wchar_t * | _wbasename (const wchar_t *) |
Parse path file name, wide char input. More... | |
wchar_t * | _wbasename_ws (const string_ws *) |
Parse path file name, struct string_ws input. | |
void * | _wbasename_selector (int, const void *) |
Automatic type selector for wbasename* functions. | |
wchar_t * | _wbaseext (const wchar_t *) |
Parse path extension, wide char input. More... | |
wchar_t * | _wbaseext_ws (const string_ws *) |
Parse path extension, struct string_ws input. | |
void * | _wbaseext_selector (int, const void *) |
Automatic type selector for wbaseext* functions. | |
wchar_t * | _wbasedir (const wchar_t *, int) |
Parse path directory + normalize slash from path, wide char input. More... | |
wchar_t * | _wbasedir_ws (const string_ws *, int) |
Parse path directory + normalize slash from path, struct string_ws input. | |
void * | _wbasedir_selector (int, const void *, int) |
Automatic type selector for wbasedir* functions. | |
wchar_t * | _wpathnormalize (const wchar_t *, size_t) |
Normalize slash from path, wide char input, int is string size, default 0. More... | |
wchar_t * | _wpathnormalize_ws (const string_ws *) |
Normalize slash from path, struct string_ws input. | |
char * | u8wpathnormalize (const wchar_t *) |
Normalize slash from path, convert file name from wide characters to UTF-8. More... | |
void | wstring_free (string_ws *restrict) |
Memory free string, empty and clear struct string_ws. More... | |
size_t | wstring_alloc (string_ws *restrict, size_t) |
Memory allocation string, struct string_ws->str output. | |
char * | wstring_wstocs_alloc (const wchar_t *restrict) |
Converting string, wchar_t input, char allocate output. More... | |
char * | wstring_swstocs_alloc (const string_ws *restrict) |
Converting string, string_ws input, char allocate output. More... | |
wchar_t * | wstring_cstows_alloc (const char *restrict) |
Converting string, char input, wchar_t allocate output. More... | |
size_t | wstring_cstows_ws_alloc (string_ws *restrict, const char *restrict) |
Converting string, string_ws input, length output. More... | |
size_t | wstring_format (string_ws *, const wchar_t *restrict,...) |
Append string, format vargs support input, struct string_ws output. More... | |
size_t | wstring_append (string_ws *, const wchar_t *restrict, size_t) |
Append string: wchar_t* , length input, struct string_ws output. More... | |
size_t | wstring_appends_ (string_ws *,...) |
Append strings, only wchar_t* strings args inputs, struct string_ws output. More... | |
size_t | wstring_append_cvt (string_ws *, const char *restrict, size_t) |
Append string: source type char* , length input, struct string_ws output. More... | |
size_t | wstring_cstows (wchar_t [], size_t, const char *restrict, size_t) |
Converting string, char input, wchar_t array output, to allocate buffer write. More... | |
size_t | wstring_wstocs (char [], size_t, const wchar_t *restrict, size_t) |
Converting string, wchar_t input, char array output, to allocate buffer write. More... | |
size_t | wstring_wstocs_ws (char [], size_t, const string_ws *restrict) |
Converting string, structure string_ws input, char array output, to allocate buffer write. | |
wchar_t * | wstring_timeformat (const wchar_t *restrict, size_t, const wchar_t *restrict, const wchar_t *restrict) |
Converting time format string to string, wchar_t and size_t input. More... | |
wchar_t * | wstring_timeformat_ws (const string_ws *restrict, const wchar_t *restrict, const wchar_t *restrict) |
Converting time format string to string, string_ws input. More... | |
long | wstring_split_cb (const string_ws *, wchar_t, split_cb, void *) |
Split string_ws string, from wchar_t characters and call split_cb to result data. More... | |
int | wstring_isempty (const wchar_t *restrict s, int) |
Check wchar_t input string is empty, bool return. More... | |
string_ws | wstring_trunc (const wchar_t *ws, int) |
Truncation string, wchar_t input, struct string_ws return. | |
size_t | wstring_trunc_alloc (string_ws *restrict, const wchar_t *, int) |
Truncation string, wchar_t input, return pointer to struct string_ws and length. | |
int | _wclosedir (WDIR_t *) |
Closes the directory stream. More... | |
WDIR_t * | _wopendir (const wchar_t *) |
Opens a directory stream and returns a pointer to the stream. The stream is set to the first entry in the directory. More... | |
wdirent_t * | _wreaddir (WDIR_t *) |
Reads the directory stream. More... | |
int | _wreaddir_r (WDIR_t *, wdirent_t *, wdirent_t **) |
Reads the directory stream extended. More... | |
int | _wreaddir_cb (wchar_t *, long, wdir_cb, void *) |
Reads the directory stream callBack. More... | |
void | _wrewinddir (WDIR_t *) |
Sets the beginning in the directory stream. More... | |
void | _wseekdir (WDIR_t *, long int) |
Sets the position in the directory stream. More... | |
long int | _wtelldir (WDIR_t *) |
Returns the current position of the directory stream. More... | |
int | wmkstemp (wchar_t *) |
Create a unique file name based on template, actually creates the file and returns its file descriptor. The name of the created file is stored in template. More... | |
struct string_ws |
struct _wdirent |
#define USED_WCHAR2LIB 1 |
Define this flag for other software, indicate enable libwchar2
in you project.
flag indicate enable libwchar2
#define wreaddir_cb_opt | ( | opt, | |
val | |||
) | ((opt) | (1L << (val))) |
Macro to set options value to function _wreaddir_cb.
opt | - long int options variable |
val | - option value, valid DIRENTRYSIZE , DIRNOROOT , DIRNODIR |
Support: ALL
#define wstocscvt | ( | A, | |
B, | |||
D | |||
) |
wchar_t* type to char[] A char[] - array name B wchar_t* - source D - function return value if error
Other non standart macro
#define wstocsncvt | ( | A, | |
B, | |||
C, | |||
D | |||
) |
wchar_t* type to char[] with size A char[] - array name B wchar_t* - source C size_t - wchar_t* size D - function return value if error
#define wstrtocscvt | ( | A, | |
B, | |||
D | |||
) |
string_ws type to char[] this struct defined on top of this file A char[] - array name B string_ws* - source D - function return value if error
typedef void(* split_cb) (wchar_t *, size_t, long, void *) |
CallBack for wstring_split_cb.
wchar_t | - splitting part from string |
size_t | - Length of string part |
long | - counter |
void | - user data |
CallBack for _wreaddir_cb.
enum access_e |
enumeration for return waccess function
wchar_t _btowc | ( | int | ) |
Convert single byte character to wide character.
wchar_t _fputwc | ( | wchar_t | , |
FILE * | restrict | ||
) |
Write a wide character to a file or stream.
int _fputws | ( | const wchar_t * | restrict, |
FILE * | restrict | ||
) |
Write a wide character string to a file or stream.
int _fwprintf | ( | FILE * | restrict, |
const wchar_t * | restrict, | ||
... | |||
) |
Write to stream wide character format variable arguments.
int _iswalnum | ( | wchar_t | ) |
Test for alphanumeric wide character, alphabetic wide character predicate.
int _iswalpha | ( | wchar_t | ) |
Test for whitespace wide character, alphabetic wide character predicate.
int _iswblank | ( | wchar_t | ) |
Test for whitespace wide character.
int _iswcntrl | ( | wchar_t | ) |
Test for control wide character.
int _iswctype | ( | wchar_t | , |
wctype_t | |||
) |
Extensible wide-character test, wide-character classification.
int _iswdigit | ( | wchar_t | ) |
Test for decimal digit wide character.
int _iswgraph | ( | wchar_t | ) |
Test for graphic wide character.
int _iswlower | ( | wchar_t | ) |
Test for lowercase wide character.
int _iswprint | ( | wchar_t | ) |
Test for printing wide character.
int _iswpunct | ( | wchar_t | ) |
Test for punctuation or symbolic wide character.
int _iswspace | ( | wchar_t | ) |
Test for whitespace wide character.
int _iswupper | ( | wchar_t | ) |
Test for uppercase wide character.
int _iswxdigit | ( | wchar_t | ) |
Test for hexadecimal digit wide character.
int _mblen | ( | const char * | , |
size_t | |||
) |
Determines the size, in bytes, of the multibyte character whose first byte is pointed.
size_t _mbrlen | ( | const char * | restrict, |
size_t | , | ||
mbstate_t * | restrict | ||
) |
Get length of multibyte character.
size_t _mbrtowc | ( | wchar_t * | restrict, |
const char *restrict | src, | ||
size_t | , | ||
mbstate_t * | restrict | ||
) |
Converts a narrow multibyte character to a wide character.
int _mbsinit | ( | const mbstate_t * | ) |
Check if initial conversion state.
size_t _mbsnrtowcs | ( | wchar_t * | restrict, |
const char ** | restrict, | ||
size_t | , | ||
size_t | , | ||
mbstate_t * | restrict | ||
) |
Convert a character string to a wide-character string.
size_t _mbsrtowcs | ( | wchar_t * | restrict, |
const char ** | restrict, | ||
size_t | , | ||
mbstate_t * | restrict | ||
) |
Convert a character string to a wide-character string.
size_t _mbstowcs | ( | wchar_t * | restrict, |
const char * | restrict, | ||
size_t | |||
) |
Minimal multibyte string to wide string converter.
int _mbtowc | ( | wchar_t * | restrict, |
const char * | restrict, | ||
size_t | |||
) |
Minimal multibyte to wide char converter.
int _swprintf | ( | wchar_t * | restrict, |
size_t | , | ||
const wchar_t * | restrict, | ||
... | |||
) |
Write formatted wide character output.
wchar_t _towctrans | ( | wchar_t | , |
wctrans_t | |||
) |
Extensible wide-character translation.
wchar_t _towlower | ( | wchar_t | ) |
Translate wide characters to lowercase.
wchar_t _towupper | ( | wchar_t | ) |
Translate wide characters to uppercase.
int _vfwprintf | ( | FILE * | restrict, |
const wchar_t * | restrict, | ||
va_list | |||
) |
Write to stream wide character format variable argument list.
int _vswprintf | ( | wchar_t * | restrict, |
size_t | , | ||
const wchar_t * | restrict, | ||
va_list | |||
) |
Write formatted data from variable argument list to sized buffer.
access_e _waccess | ( | const wchar_t * | , |
int | |||
) |
Check permissions for a file or directory, wide char input.
enum
access_e resultExample:
wchar_t* _wbasedir | ( | const wchar_t * | , |
int | |||
) |
Parse path directory + normalize slash from path, wide char input.
wchar_t* _wbaseext | ( | const wchar_t * | ) |
Parse path extension, wide char input.
wchar_t* _wbasename | ( | const wchar_t * | ) |
Parse path file name, wide char input.
int _wclosedir | ( | WDIR_t * | ) |
Closes the directory stream.
The wclosedir()
function closes the directory stream. If the function is successfully called, the file descriptor associated with the directory is also closed. The descriptor of the directory stream opened in the past will be unavailable after this call.
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
? | This code | x | This code |
wchar_t* _wcpcpy | ( | wchar_t * | , |
const wchar_t * | |||
) |
Copy a wide-character string returning a pointer to its end.
wchar_t* _wcpncpy | ( | wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
Copy part of a wide-character string returning a pointer to its end.
size_t _wcrtomb | ( | char * | restrict, |
wchar_t | , | ||
mbstate_t * | restrict | ||
) |
Convert wide character to multibyte sequence.
int _wcscasecmp | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Case-insensitive wide character string compare.
wchar_t* _wcscat | ( | wchar_t * | , |
const wchar_t * | |||
) |
Concatenate wide-character strings.
wchar_t* _wcschr | ( | const wchar_t * | , |
wchar_t | |||
) |
Search for wide character in string.
int _wcscmp | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Wide-character string compare.
size_t _wcsftime | ( | wchar_t * | restrict, |
size_t | sz, | ||
const wchar_t * | restrict, | ||
const void * | restrict | ||
) |
Convert date and time to a formatted wide-character string.
The original version of the strftime()
function is used for the conversion. The wcsftime()
function converts the results from wide characters to a multibyte string and back.
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
x | x | This code | This code |
Example:
size_t _wcslen | ( | const wchar_t * | ) |
Wide-character string length.
int _wcsncasecmp | ( | const wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
Case-insensitive wide character string compare with size.
wchar_t* _wcsncat | ( | wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
Concatenate wide-character strings with size.
int _wcsncmp | ( | const wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
wchar_t* _wcsncpy | ( | wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
Counted copy wide-character string.
size_t _wcsnlen | ( | const wchar_t * | , |
size_t | |||
) |
Wide-character string length with maximum limit.
size_t _wcsnrtombs | ( | char * | restrict, |
const wchar_t ** | restrict, | ||
size_t | , | ||
size_t | , | ||
mbstate_t * | restrict | ||
) |
Convert a wide-character string to a character string.
wchar_t* _wcspbrk | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Find wide characters in string.
wchar_t* _wcsptime | ( | const wchar_t * | , |
const wchar_t * | , | ||
void * | |||
) |
Convert a wide-character string representation of time to a time tm
structure.
The function wcsptime()
is equivalent to the function strptime()
. The wcsptime()
function converts a wide character string into a tm
structure format, according to the format specified in the parameters.
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
x | This code | This code | This code |
Example:
wchar_t* _wcsrchr | ( | const wchar_t * | , |
wchar_t | |||
) |
Reverse search for wide character in string.
size_t _wcsrtombs | ( | char * | restrict, |
const wchar_t ** | restrict, | ||
size_t | , | ||
mbstate_t * | restrict | ||
) |
Convert a wide-character string to a character string.
size_t _wcsspn | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Find initial match in wide-character string.
Find initial match in wide-character string
wchar_t* _wcsstr | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Find wide-character string segment.
double _wcstod | ( | const wchar_t * | , |
wchar_t ** | |||
) |
Convert wide character ASCII string to double
number.
float _wcstof | ( | const wchar_t * | , |
wchar_t ** | |||
) |
Convert wide character ASCII string to float
number.
intmax_t _wcstoimax | ( | const wchar_t * | , |
wchar_t ** | , | ||
int | |||
) |
Convert wide character ASCII string to intmax_t
integer.
wchar_t* _wcstok | ( | wchar_t * | , |
const wchar_t * | , | ||
wchar_t ** | |||
) |
Tokenize wide-character string.
long int _wcstol | ( | const wchar_t * | , |
wchar_t ** | , | ||
int | |||
) |
Convert wide character ASCII string to long int
number.
long double _wcstold | ( | const wchar_t * | , |
wchar_t ** | |||
) |
Convert wide character ASCII string to long double
number.
long long int _wcstoll | ( | const wchar_t * | , |
wchar_t ** | , | ||
int | |||
) |
Convert wide character ASCII string to long long int
number.
size_t _wcstombs | ( | char * | restrict, |
const wchar_t * | restrict, | ||
size_t | |||
) |
Minimal wide string to multibyte string converter.
size_t _wcstombs_s | ( | char * | restrict, |
const wchar_t * | restrict, | ||
size_t | |||
) |
Minimal wide string to multibyte string converter + double size out buffer.
unsigned long int _wcstoul | ( | const wchar_t * | , |
wchar_t ** | , | ||
int | |||
) |
Convert wide character ASCII string to unsigned long int
number.
unsigned long long int _wcstoull | ( | const wchar_t * | , |
wchar_t ** | , | ||
int | |||
) |
Convert wide character ASCII string to unsigned long long int
number.
uintmax_t _wcstoumax | ( | const wchar_t * | , |
wchar_t ** | , | ||
int | |||
) |
Convert wide character ASCII string to uintmax_t
integer.
int _wcswidth | ( | const wchar_t * | , |
size_t | |||
) |
Number of column positions of a wide-character string.
int _wctob | ( | wchar_t | ) |
Convert wide character to single byte.
int _wctomb | ( | char * | , |
wchar_t | |||
) |
Minimal wide char to multibyte converter.
wctrans_t _wctrans | ( | const char * | ) |
Compute wide-character translation type.
wctype_t _wctype | ( | const char * | ) |
Compute wide-character test type.
int _wcwidth | ( | wchar_t | ) |
Number of column positions of a wide-character code.
FILE* _wfopen | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Open the stream for the file, takes as the first parameter the file name and the second parameter the opening mode in the form of wide characters.
FILE* _wfopen_s | ( | const wchar_t * | , |
size_t | , | ||
const wchar_t * | |||
) |
The same as _wfopen, the size_t
parameter must contain the length of the variable of the file name, or zero.
FILE* _wfopen_selector | ( | int | , |
const void * | , | ||
size_t | , | ||
const void * | |||
) |
Automatic type selector for wfopen*
functions.
FILE* _wfopen_ws | ( | const string_ws * | , |
const wchar_t * | |||
) |
wchar_t* _wmemchr | ( | const wchar_t * | , |
wchar_t | , | ||
size_t | |||
) |
Find wide character in memory.
int _wmemcmp | ( | const wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
Compare wide characters in memory.
wchar_t* _wmemcpy | ( | wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
Copy wide characters in memory.
wchar_t* _wmemmove | ( | wchar_t * | , |
const wchar_t * | , | ||
size_t | |||
) |
Copy wide characters in memory with overlapping areas.
wchar_t* _wmemset | ( | wchar_t * | , |
wchar_t | , | ||
size_t | |||
) |
Set wide characters in memory.
int _wmkdir | ( | const wchar_t * | , |
mode_t | |||
) |
Creates a directory or a chain of directories specified in the path.
mkdir
command with the -p
switch for all functions wmkdir*()
If the internal flag EXIST
is received while creating the directory, the function continues execution, if this is the last one from the list of created directories, it returns 0
. In other cases, returns a standard response as a function of mkdir()
. If the directory exists from the specified path, the function continues execution, proceeding to create the next directory.int _wmkdir_s | ( | const wchar_t * | , |
size_t | , | ||
mode_t | |||
) |
The same as _wmkdir, the size_t
parameter must contain the length of the variable of the file name, or zero.
int _wmkdir_selector | ( | int | , |
const void * | , | ||
size_t | , | ||
mode_t | |||
) |
Automatic type selector for wmkdir*
functions.
int _wmkdir_ws | ( | const string_ws * | , |
mode_t | |||
) |
WDIR_t* _wopendir | ( | const wchar_t * | ) |
Opens a directory stream and returns a pointer to the stream. The stream is set to the first entry in the directory.
After a successful call, the file descriptor of the open directory is used only within the implementation and should not be used in the application. The function sets the close-on-exec
flag for the file descriptor that points to the directory.
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
? | This code | x | This code |
wchar_t* _wpathnormalize | ( | const wchar_t * | , |
size_t | |||
) |
Normalize slash from path, wide char input, int is string size, default 0.
int _wprintf | ( | const wchar_t *restrict | fmt, |
... | |||
) |
Write a formatted wide character string to 'stdout'.
Reads the directory stream.
It reads the directory stream, returns a pointer to the wdirent_t
structure, which represents the next element in the catalog stream. The function returns NULL
when the last record in the directory stream is reached or if an error occurred.
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
? | This code | x | This code |
int _wreaddir_cb | ( | wchar_t * | , |
long | , | ||
wdir_cb | , | ||
void * | |||
) |
Reads the directory stream callBack.
wchar_t | - directory path |
long | - options, valid DIRENTRYSIZE , DIRNOROOT , DIRNODIR bit mask set: wreaddir_cb_opt |
wdir_cb | - callback function, see wdir_cb |
void | - user data |
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
This code | This code | This code | This code |
Table flags compatible:
FLAGS | GNU | MinGW | MSVC/MSVS | Description |
---|---|---|---|---|
DIRENTRYSIZE | x | Always | Always | Calculate size of entry |
DIRNOROOT | x | x | x | Skip root directory . and .. |
DIRNODIR | x | x | x | Skip all directory |
Example:
Example CallBack:
Reads the directory stream extended.
The function wreaddir_r()
is a reentrant version. It reads the next entry from the open catalog stream and returns it in the created call buffer pointed to by the second parameter of the function. The pointer to the returned element is placed in the third parameter of the function, if the end of the directory stream is reached, NULL
is returned instead of the value.
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
? | This code | x | This code |
int _wremove | ( | const wchar_t * | ) |
The wremove*()
function deletes a name from the file system.
0
is returned, in the event of a -1
error. On error, errno
is set to: ENOENT
- the file does not exist, or in EACESS
- access is denied.int _wremove_s | ( | const wchar_t * | , |
size_t | |||
) |
The same as _wremove, the size_t
parameter must contain the length of the variable of the file name, or zero.
int _wremove_selector | ( | int | , |
const void * | , | ||
size_t | |||
) |
Automatic type selector for wremove*
functions.
int _wremove_ws | ( | const string_ws * | ) |
int _wrename | ( | const wchar_t * | , |
const wchar_t * | |||
) |
The wrename()
function changes the file name to a new one.
The wrename*()
function changes the name or location of the file, returns a standard response as a function of rename()
. The new name must not be the same as the names in the directory.
wrename()
returns 0
in case of success and a nonzero value in case of an error. On error, errno
is set, indicating an error.int _wrename_s | ( | const wchar_t * | , |
size_t | , | ||
const wchar_t * | , | ||
size_t | |||
) |
The same as _wrename, the size_t
parameter must contain the length of the variable of the file name, or zero.
int _wrename_selector | ( | int | , |
const void * | , | ||
size_t | , | ||
const void * | , | ||
size_t | |||
) |
Automatic type selector for wrename*
functions.
void _wrewinddir | ( | WDIR_t * | ) |
Sets the beginning in the directory stream.
The wrewinddir()
function flushes the current position of the stream to the beginning of the directory.
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
This code | This code | x | This code |
void _wseekdir | ( | WDIR_t * | , |
long | int | ||
) |
Sets the position in the directory stream.
The _wseekdir function sets the position in the directory stream from which the next call to _wreaddir will begin. The position argument must be a value that is returned by the previously called _wtelldir function.
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
? | This code | - | - |
int _wstat | ( | const wchar_t * | , |
void * | |||
) |
Functions wstat*()
fill the structure with data about the file pointed to by struct stat
, associated with the file name.
0
is returned. In case of failure, -1
is returned, and errno
is set to ENOENT
.wstat*()
is completely analogous to the function stat()
int _wstat_s | ( | const wchar_t * | , |
size_t | , | ||
void * | |||
) |
The same as _wstat, the size_t
parameter must contain the length of the variable of the file name, or zero.
int _wstat_selector | ( | int | , |
const void * | , | ||
size_t | , | ||
const void * | |||
) |
Automatic type selector for wstat*
functions.
int _wstat_ws | ( | const string_ws * | , |
void * | |||
) |
long int _wtelldir | ( | WDIR_t * | ) |
Returns the current position of the directory stream.
If successful, the wtelldir()
function returns the current location in the directory stream. In case of an error, -1
is returned, and the corresponding value of errno
is set.
Support:
IBM | GNU | MinGW | MSVC/MSVS |
---|---|---|---|
? | This code | - | - |
size_t u8stowcs | ( | wchar_t * | , |
const char * | |||
) |
Covert utf-8 char*
to wchar_t*
wchar_t* | - output |
const | char*: - input return size_t - size |
int u8sverify | ( | const char * | ) |
Verify char*
to utf-8 valid string.
const | char*: - input |
int | - output (bool) |
access_e u8waccess | ( | const wchar_t * | , |
int | |||
) |
Check permissions for a file or directory, convert file name from wide characters to UTF-8.
FILE* u8wfopen | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Open file stream, after converting the file name from wide characters to UTF-8.
u8wfopen
requires to free the returned result int u8wmkdir | ( | const wchar_t * | , |
mode_t | |||
) |
Creates a directory or a chain of directories specified in the path, after converting the file name from wide characters to UTF-8.
u8wmkdir
requires to free the returned result char* u8wpathnormalize | ( | const wchar_t * | ) |
Normalize slash from path, convert file name from wide characters to UTF-8.
int u8wremove | ( | const wchar_t * | ) |
Delete (remove) file or directory, after converting the file name from wide characters to UTF-8.
u8wremove
requires to free the returned result int u8wrename | ( | const wchar_t * | , |
const wchar_t * | |||
) |
Rename file, after converting the file name from wide characters to UTF-8.
u8wrename
requires to free the returned result int u8wstat | ( | const wchar_t * | , |
void * | |||
) |
Get file statistics by first converting the file name from wide characters to UTF-8.
u8wstat
requires to free the returned result void wcprint | ( | wchar_t * | ) |
wchar_t* print This function to test variably only! Instead use _vfprintf, _vfwprintf, _fprintf, _fwprintf
wchar_t* wcsregexp | ( | wchar_t * | restrict, |
wchar_t * | restrict, | ||
int * | |||
) |
wcsregexp - Matches a regular expression
Original name: aov-rx - Angel Ortega's regular expression library Copyright (C) 2011/2012 Angel Ortega angel @tri ptico .comhttps://github.com/angelortega/aov-rx or http://triptico.com
rx | the regular expression |
tx | the text to be matched |
size | a pointer to integer where the matching length is stored |
Matches the string tx for the regular expression in rx. On output, the integer pointer by size will contain the number of matched characters (with 0 meaning that no matching was possible). If the end of string mark ($) is used in the regular expression and a match is effective, the ending zero is included in the match.
Returns the address of the match.
size_t wcstou8s | ( | char * | , |
const wchar_t * | |||
) |
Convert wchar_t*
to utf-8 char*
char* | - output |
const | wchar_t*: - input return size_t - size |
int wmkstemp | ( | wchar_t * | ) |
Create a unique file name based on template, actually creates the file and returns its file descriptor. The name of the created file is stored in template.
The wmkstemp()
function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file. The name of the created file is stored in template.
-1
and set errno
to EEXIST
, EINVAL
or EFAULT
.Example:
size_t wstring_append | ( | string_ws * | , |
const wchar_t * | restrict, | ||
size_t | |||
) |
Append string: wchar_t*
, length input, struct string_ws
output.
destination | string_ws |
source | String type wchar_t* . |
length | length of source string. |
output
produced.wstring_append()
requires to free the returned resultExample:
size_t wstring_append_cvt | ( | string_ws * | , |
const char * | restrict, | ||
size_t | |||
) |
Append string: source type char*
, length input, struct string_ws
output.
destination | string_ws |
source | String type char* . |
length | length of source string. |
output
produced.wstring_append_cvt()
requires to free the returned result size_t wstring_appends_ | ( | string_ws * | , |
... | |||
) |
Append strings, only wchar_t*
strings args inputs, struct string_ws
output.
destination | string_ws |
arguments | Strings type wchar_t* , 126 max. |
output
produced.wstring_appends()
macro, or end the last function's parameters with a value of NULL
. wstring_appends_()
requires to free the returned resultExample:
size_t wstring_cstows | ( | wchar_t | [], |
size_t | , | ||
const char * | restrict, | ||
size_t | |||
) |
Converting string, char
input, wchar_t
array output, to allocate buffer write.
Example:
wchar_t* wstring_cstows_alloc | ( | const char * | restrict | ) |
Converting string, char input, wchar_t allocate output.
size_t wstring_cstows_ws_alloc | ( | string_ws * | restrict, |
const char * | restrict | ||
) |
Converting string, string_ws input, length output.
size_t wstring_format | ( | string_ws * | , |
const wchar_t * | restrict, | ||
... | |||
) |
Append string, format vargs
support input, struct string_ws
output.
destination | string_ws |
format | String type wchar_t* . |
arguments | Arguments support to vargs types, 125 max. |
output
produced.Example:
int wstring_isempty | ( | const wchar_t *restrict | s, |
int | |||
) |
Check wchar_t input string is empty, bool return.
char* wstring_swstocs_alloc | ( | const string_ws * | restrict | ) |
Converting string, string_ws input, char allocate output.
wchar_t* wstring_timeformat | ( | const wchar_t * | restrict, |
size_t | , | ||
const wchar_t * | restrict, | ||
const wchar_t * | restrict | ||
) |
Converting time format string to string, wchar_t and size_t input.
Example:
wchar_t* wstring_timeformat_ws | ( | const string_ws * | restrict, |
const wchar_t * | restrict, | ||
const wchar_t * | restrict | ||
) |
Converting time format string to string, string_ws input.
size_t wstring_wstocs | ( | char | [], |
size_t | , | ||
const wchar_t * | restrict, | ||
size_t | |||
) |
Converting string, wchar_t
input, char
array output, to allocate buffer write.
Example:
char* wstring_wstocs_alloc | ( | const wchar_t * | restrict | ) |
Converting string, wchar_t input, char allocate output.