The m17n Library  1.8.4
Functions | Variables
mtext.c File Reference
Include dependency graph for mtext.c:

Functions

MTextmtext ()
 Allocate a new M-text. More...
 
MTextmtext_from_data (const void *data, int nitems, enum MTextFormat format)
 Allocate a new M-text with specified data. More...
 
void * mtext_data (MText *mt, enum MTextFormat *fmt, int *nunits, int *pos_idx, int *unit_idx)
 Get information about the text data in M-text. More...
 
int mtext_len (MText *mt)
 Number of characters in M-text. More...
 
int mtext_ref_char (MText *mt, int pos)
 Return the character at the specified position in an M-text. More...
 
int mtext_set_char (MText *mt, int pos, int c)
 Store a character into an M-text. More...
 
MTextmtext_cat_char (MText *mt, int c)
 Append a character to an M-text. More...
 
MTextmtext_dup (MText *mt)
 Create a copy of an M-text. More...
 
MTextmtext_cat (MText *mt1, MText *mt2)
 Append an M-text to another. More...
 
MTextmtext_ncat (MText *mt1, MText *mt2, int n)
 Append a part of an M-text to another. More...
 
MTextmtext_cpy (MText *mt1, MText *mt2)
 Copy an M-text to another. More...
 
MTextmtext_ncpy (MText *mt1, MText *mt2, int n)
 Copy the first some characters in an M-text to another. More...
 
MTextmtext_duplicate (MText *mt, int from, int to)
 Create a new M-text from a part of an existing M-text. More...
 
MTextmtext_copy (MText *mt1, int pos, MText *mt2, int from, int to)
 Copy characters in the specified range into an M-text. More...
 
int mtext_del (MText *mt, int from, int to)
 Delete characters in the specified range destructively. More...
 
int mtext_ins (MText *mt1, int pos, MText *mt2)
 Insert an M-text into another M-text. More...
 
int mtext_insert (MText *mt1, int pos, MText *mt2, int from, int to)
 Insert sub-text of an M-text into another M-text. More...
 
int mtext_ins_char (MText *mt, int pos, int c, int n)
 Insert a character into an M-text. More...
 
int mtext_replace (MText *mt1, int from1, int to1, MText *mt2, int from2, int to2)
 Replace sub-text of M-text with another. More...
 
int mtext_character (MText *mt, int from, int to, int c)
 Search a character in an M-text. More...
 
int mtext_chr (MText *mt, int c)
 Return the position of the first occurrence of a character in an M-text. More...
 
int mtext_rchr (MText *mt, int c)
 Return the position of the last occurrence of a character in an M-text. More...
 
int mtext_cmp (MText *mt1, MText *mt2)
 Compare two M-texts character-by-character. More...
 
int mtext_ncmp (MText *mt1, MText *mt2, int n)
 Compare initial parts of two M-texts character-by-character. More...
 
int mtext_compare (MText *mt1, int from1, int to1, MText *mt2, int from2, int to2)
 Compare specified regions of two M-texts. More...
 
int mtext_spn (MText *mt, MText *accept)
 Search an M-text for a set of characters. More...
 
int mtext_cspn (MText *mt, MText *reject)
 Search an M-text for the complement of a set of characters. More...
 
int mtext_pbrk (MText *mt, MText *accept)
 Search an M-text for any of a set of characters. More...
 
MTextmtext_tok (MText *mt, MText *delim, int *pos)
 Look for a token in an M-text. More...
 
int mtext_text (MText *mt1, int pos, MText *mt2)
 Locate an M-text in another. More...
 
int mtext_search (MText *mt1, int from, int to, MText *mt2)
 Locate an M-text in a specific range of another. More...
 
int mtext_casecmp (MText *mt1, MText *mt2)
 Compare two M-texts ignoring cases. More...
 
int mtext_ncasecmp (MText *mt1, MText *mt2, int n)
 Compare initial parts of two M-texts ignoring cases. More...
 
int mtext_case_compare (MText *mt1, int from1, int to1, MText *mt2, int from2, int to2)
 Compare specified regions of two M-texts ignoring cases. More...
 
int mtext_lowercase (MText *mt)
 Lowercase an M-text. More...
 
int mtext_titlecase (MText *mt)
 Titlecase an M-text. More...
 
int mtext_uppercase (MText *mt)
 Uppercase an M-text. More...
 
MTextmdebug_dump_mtext (MText *mt, int indent, int fullp)
 Dump an M-text. More...
 

Variables

enum MTextFormat MTEXT_FORMAT_UTF_16 = MTEXT_FORMAT_UTF_16LE
 Variable of value MTEXT_FORMAT_UTF_16LE or MTEXT_FORMAT_UTF_16BE. More...
 
const int MTEXT_FORMAT_UTF_32 = MTEXT_FORMAT_UTF_32LE
 Variable of value MTEXT_FORMAT_UTF_32LE or MTEXT_FORMAT_UTF_32BE. More...
 
MSymbol Mlanguage
 

m17n-lib Home