Julius 4.2
マクロ定義 | 関数
libsent/src/util/mystrtok.c

文字列をクォーテーションを考慮してトークンに分割する [詳細]

#include <sent/stddefs.h>

ソースコードを見る。

マクロ定義

#define ISTOKEN(A)   strchr(delim, A)
 Abbreviation macro to find if A is included in string delim.

関数

char * mystrtok_quotation (char *str, char *delim, int left_paren, int right_paren, int mode)
 Generic function to extract tokens from strings, with quotation handling.
char * mystrtok_quote (char *str, char *delim)
 Extract tokens considering quotation by double quotation mark.
char * mystrtok (char *str, char *delim)
 Extract tokens, not considering quotation, just as the same as strtok.
char * mystrtok_movetonext (char *str, char *delim)
 Just move to the beginning of the next token, without modifying the str.

説明

文字列をクォーテーションを考慮してトークンに分割する

文字列を空白等でトークンに分割します.このとき,指定された クォーテーション記号で囲まれた部分は必ず1つのトークンとして扱われます.

作者:
Akinobu LEE
日付:
Thu Feb 17 16:31:39 2005
Revision:
1.3

mystrtok.c で定義されています。


関数

char* mystrtok_quotation ( char *  str,
char *  delim,
int  left_paren,
int  right_paren,
int  mode 
)

Generic function to extract tokens from strings, with quotation handling.

The usage is as the same as strtok.

引数:
str[i/o] source string, or NULL when this is a continuous call from previous call. Will be truncated in this function.
delim[in] string to specify the delimiters.
left_paren[in] left brace
right_paren[in] right brace
mode[in] if 1, just move to the beginning of next token
戻り値:
pointer to the next extracted token.

mystrtok.c51 行で定義されています。

参照元 mystrtok(), mystrtok_movetonext(), mystrtok_quote(), voca_load_htkdict_line(), と voca_load_wordlist_line().

char* mystrtok_quote ( char *  str,
char *  delim 
)

Extract tokens considering quotation by double quotation mark.

引数:
str[i/o] source string, will be truncated.
delim[in] string of all token delimiters
戻り値:
pointer to the next extracted token, or NULL when no token found.

mystrtok.c107 行で定義されています。

参照元 rdhmmdef(), read_token(), voca_load_htkdict_line(), と voca_load_wordlist_line().

char* mystrtok ( char *  str,
char *  delim 
)

Extract tokens, not considering quotation, just as the same as strtok.

引数:
str[i/o] source string, will be truncated.
delim[in] string of all token delimiters
戻り値:
pointer to the next extracted token, or NULL when no token found.

mystrtok.c121 行で定義されています。

参照元 voca_load_htkdict_line(), と voca_load_wordlist_line().

char* mystrtok_movetonext ( char *  str,
char *  delim 
)

Just move to the beginning of the next token, without modifying the str.

引数:
str[i/o] source string, will be truncated.
delim[in] string of all token delimiters
戻り値:
pointer to the next extracted token, or NULL when no token found.

mystrtok.c135 行で定義されています。

参照元 voca_load_htkdict_line(), と voca_load_wordlist_line().