変数: UTF-16 と UTF-32 のデフォルトのエンディアン | |
const enum MTextFormat | MTEXT_FORMAT_UTF_16 |
値が MTEXT_FORMAT_UTF_16LE か MTEXT_FORMAT_UTF_16BE である変数 | |
const int | MTEXT_FORMAT_UTF_32 |
値が MTEXT_FORMAT_UTF_32LE か MTEXT_FORMAT_UTF_32BE である変数 | |
型定義 | |
typedef MText | MText |
MText の型宣言. | |
列挙型 | |
enum | MTextFormat { MTEXT_FORMAT_US_ASCII, MTEXT_FORMAT_UTF_8, MTEXT_FORMAT_UTF_16LE, MTEXT_FORMAT_UTF_16BE, MTEXT_FORMAT_UTF_32LE, MTEXT_FORMAT_UTF_32BE, MTEXT_FORMAT_MAX } |
M-text のフォーマットを指定する列挙型. [詳細] | |
関数 | |
int | mtext_line_break (MText *mt, int pos, int option, int *after) |
MText * | mtext () |
新しいM-textを割り当てる. | |
MText * | mtext_from_data (const void *data, int nitems, enum MTextFormat format) |
指定のデータを元に新しい M-text を割り当てる. | |
void * | mtext_data (MText *mt, enum MTextFormat *fmt, int *nunits, int *pos_idx, int *unit_idx) |
int | mtext_len (MText *mt) |
M-text 中の文字の数. | |
int | mtext_ref_char (MText *mt, int pos) |
M-text 中の指定された位置の文字を返す. | |
int | mtext_set_char (MText *mt, int pos, int c) |
M-text に一文字を設定する. | |
MText * | mtext_cat_char (MText *mt, int c) |
M-text に一文字追加する. | |
MText * | mtext_dup (MText *mt) |
M-text のコピーを作る. | |
MText * | mtext_cat (MText *mt1, MText *mt2) |
2個の M-textを連結する. | |
MText * | mtext_ncat (MText *mt1, MText *mt2, int n) |
M-text の一部を別の M-text に付加する. | |
MText * | mtext_cpy (MText *mt1, MText *mt2) |
M-text を別の M-text にコピーする. | |
MText * | mtext_ncpy (MText *mt1, MText *mt2, int n) |
M-text に含まれる最初の何文字かをコピーする. | |
MText * | mtext_duplicate (MText *mt, int from, int to) |
既存の M-text の一部から新しい M-text をつくる. | |
MText * | mtext_copy (MText *mt1, int pos, MText *mt2, int from, int to) |
M-text に指定範囲の文字をコピーする. | |
int | mtext_del (MText *mt, int from, int to) |
指定範囲の文字を破壊的に取り除く. | |
int | mtext_ins (MText *mt1, int pos, MText *mt2) |
M-text を別の M-text に挿入する. | |
int | mtext_insert (MText *mt1, int pos, MText *mt2, int from, int to) |
M-text の一部を別の M-text に挿入する. | |
int | mtext_ins_char (MText *mt, int pos, int c, int n) |
M-text に文字を挿入する. | |
int | mtext_replace (MText *mt1, int from1, int to1, MText *mt2, int from2, int to2) |
M-text の一部を別の M-text の一部で置換する. | |
int | mtext_character (MText *mt, int from, int to, int c) |
M-text 中で文字を探す. | |
int | mtext_chr (MText *mt, int c) |
M-text 中で指定された文字が最初に現れる位置を返す. | |
int | mtext_rchr (MText *mt, int c) |
M-text 中で指定された文字が最後に現れる位置を返す. | |
int | mtext_cmp (MText *mt1, MText *mt2) |
二つの M-text を文字単位で比較する. | |
int | mtext_ncmp (MText *mt1, MText *mt2, int n) |
二つの M-text の先頭部分を文字単位で比較する. | |
int | mtext_compare (MText *mt1, int from1, int to1, MText *mt2, int from2, int to2) |
二つの M-text の指定した領域同士を比較する. | |
int | mtext_spn (MText *mt, MText *accept) |
ある集合の文字を M-text の中で探す. | |
int | mtext_cspn (MText *mt, MText *reject) |
ある集合に属さない文字を M-text の中で探す. | |
int | mtext_pbrk (MText *mt, MText *accept) |
ある集合に属す文字を M-text の中から探す. | |
MText * | mtext_tok (MText *mt, MText *delim, int *pos) |
M-text 中のトークンを探す. | |
int | mtext_text (MText *mt1, int pos, MText *mt2) |
M-text 中で別の M-text を探す. | |
int | mtext_search (MText *mt1, int from, int to, MText *mt2) |
M-text 中の特定の領域で別の M-text を探す. | |
int | mtext_casecmp (MText *mt1, MText *mt2) |
二つの M-text を大文字/小文字の区別を無視して比較する. | |
int | mtext_ncasecmp (MText *mt1, MText *mt2, int n) |
二つの M-text の先頭部分を大文字/小文字の区別を無視して比較する. | |
int | mtext_case_compare (MText *mt1, int from1, int to1, MText *mt2, int from2, int to2) |
二つの M-text の指定した領域を、大文字/小文字の区別を無視して比較する. | |
int | mtext_lowercase (MText *mt) |
M-text を小文字にする. | |
int | mtext_titlecase (MText *mt) |
M-text をタイトルケースにする. | |
int | mtext_uppercase (MText *mt) |
M-text を大文字にする. | |
変数 | |
MSymbol | Mlanguage |
char *
や unsigned char *
)ではなく M-text と呼ぶオブジェクトでテキストを表現する。 M-text は長さ 0 以上の文字列であり、種々の文字ソース(たとえば C-string、ファイル、文字コード等)から作成できる。M-text には、C-string にない以下の特徴がある。
|
|
|
|