|
Data Structures |
struct | st_string_forward_conversion |
| Structure for initialized converter data. More...
|
Defines |
#define | CharToIcu(cnv, dst, dst_size, src, src_size) |
| Convert from char* to icu (UChar*).
|
#define | CharToWchar(cnv, dst, dst_size, src, src_size) mbstowcs(dst, src, dst_size) |
| Convert from char* to UTF32 (wchar_t*).
|
#define | IcuToChar(cnv, dst, dst_size, src, src_size) |
| Convert from icu (UChar*) to char*.
|
#define | IcuToWchar(cnv, dst, dst_size, src, src_size) wcsncpy(dst, src, dst_size) |
| Copy from icu (UChar*) to UTF16 (wchar_t*).
|
#define | MAsciiFrom(cnv, dst, dst_size, src, src_size) Mstrncpy(dst, src, ((size_t)dst_size > (size_t)src_size ? src_size + 1 : dst_size)) |
| Convert a Mchar string to a Ascii (char*) string literal.
|
#define | MAsciiTo(cnv, dst, dst_size, src, src_size) Mstrncpy(dst, src, ((size_t)dst_size > (size_t)src_size ? src_size + 1 : dst_size)) |
| Convert Ascii string (char*) to a Mchar literal.
|
#define | Mchar char |
| Forward definition to char as character type.
|
#define | Mdecl(name, value) static Mchar name[] = value |
| Declaration for static string literals.
|
#define | Mdecln(name, value, len) static Mchar name[len] = value |
| Declaration for static string literals up to len characters.
|
#define | MicuFrom(cnv, dst, dst_size, src, src_size) CharToIcu(cnv, dst, dst_size, src, src_size) |
| Convert from Mchar to icu (UChar*).
|
#define | MicuTo(cnv, dst, dst_size, src, src_size) IcuToChar(cnv, dst, dst_size, src, src_size) |
| Convert from icu (UChar*) to Mchar.
|
#define | Minit(name, value) |
| Initialisation for static string literals.
|
#define | Minitn(name, value, len) |
| Initialisation for static string literals up to len characters.
|
#define | MSC "%s" |
| Mchar format string character.
|
#define | Msizeof(s) sizeof(s) |
| Get size (number of characters) of static allocated string literal.
|
#define | Msnprintf(dst, s, fmt...) snprintf(dst, s, fmt) |
| Formatted output to a string.
|
#define | Mstrcmp(s1, s2) strcmp(s1, s2) |
| Compare to Mchar* literals.
|
#define | Mstrdup(s) strdup(s) |
| Make dynamic allocated duplicated of string.
|
#define | Mstrlen(s) strlen(s) |
| Mchars implementation of strlen.
|
#define | Mstrncat(dst, src, dst_size) strncat((Mchar*)dst, (const Mchar*)src, dst_size) |
| strncat implementation with buffer overflow protection
|
#define | Mstrncmp(s1, s2, c) strncmp(s1, s2, c) |
| Compare two strings with maximum number of characters.
|
#define | Mstrncpy(dst, src, dst_size) strncpy((char*)(dst), (const char*)(src), dst_size) |
| strncpy implementation with buffer overflow protection
|
#define | Mstrsize(s) (Mstrlen(s)+1) |
| Get the number of chacters needed to store the literal.
|
#define | Mstrstr(in, for) strstr(in, for) |
| Search for part in string.
|
#define | Mtolower(c) tolower(c) |
#define | Mtoupper(c) toupper(c) |
#define | MwcharFrom(cnv, dst, dst_size, src, src_size) CharToWchar(cnv, dst, dst_size, src, src_size) |
| Convert from Mchar to wchar_t.
|
#define | MwcharTo(cnv, dst, dst_size, src, src_size) WcharToChar(cnv, dst, dst_size, src, src_size) |
| Convert from wchar_t to Mchar.
|
#define | WcharToChar(cnv, dst, dst_size, src, src_size) wcstombs(dst, src, dst_size) |
| Convert from UTF32 (wchar_t*) to char*.
|
#define | WcharToIcu(cnv, dst, dst_size, src, src_size) wcsncpy(dst, src, dst_size) |
| Copy from UTF16 (wchar_t*) to icu (UChar*).
|
Typedefs |
typedef st_string_forward_conversion | string_forward_conversion_t |
| Structure for initialized converter data.
|
Functions |
void | Acopy2M (char *dst, const char *src, int size) |
double | Matof (const char *s) |
int | Matoi (const char *s) |
int64_t | Matoll (const char *s) |
void | Mcopy2A (char *dst, const char *src, int size) |
char * | MdupAsciiFrom (const char *s) |
char * | MdupAsciiTo (const char *s) |
void | MfreeConversion (string_forward_conversion_t *) |
| Destroy a new conversion structure.
|
string_forward_conversion_t * | MprepareConversion (void) |
| Prepare a new conversion structure.
|
int | MUtf8From (string_forward_conversion_t *cnv, char *dst, size_t dst_size, const char *src, size_t src_size) |
int | MUtf8To (string_forward_conversion_t *cnv, char *dst, size_t dst_size, const char *src, size_t src_size) |
int | WcharSnprintf (wchar_t *dst, int s, const char *fmt,...) |
| snprintf() implementation for wchar_t bases fmt on char*.
|