XINU
|
Go to the source code of this file.
Functions | |
char * | strchr (const char *, int32) |
指定された文字を文字列から探し、最初にに見つかった位置をポインタで返す。 More... | |
int | strlen (char *str) |
NULL終端された文字列の長さを返す。NULL終端は長さに含まない。 More... | |
char * | strncat (char *, const char *, int32) |
文字列s1の末尾に文字列s2をN文字(Byte)分、結合する。 More... | |
int32 | strncmp (const char *, const char *, int32) |
char * | strncpy (char *, const char *, int32) |
文字列s1に文字列s2をN文字(Byte)分コピーする。 More... | |
int32 | strnlen (const char *, uint32) |
NULL終端された文字列の長さを返す。NULL終端は長さに含まない。 More... | |
char * | strrchr (const char *, int32) |
文字列の後方から指定された文字を探し、最後に見つかった位置をポインタで返す。 More... | |
char * | strstr (const char *, const char *) |
検索対象の文字列Aから文字列Bを探す。 More... | |
char* strchr | ( | const char * | s, |
int | c | ||
) |
指定された文字を文字列から探し、最初にに見つかった位置をポインタで返す。
[in] | s | 探索対象の文字列 |
[in] | c | 検索文字 |
int strlen | ( | char * | str | ) |
NULL終端された文字列の長さを返す。NULL終端は長さに含まない。
[in] | str | 長さを調べる対象の文字列 |
Definition at line 11 of file strlen.c.
Referenced by addton(), devisid(), devonid(), dns_bldq(), dns_geta(), getattrid(), if(), newdev(), newtype(), and xsh_ping().
char* strncat | ( | char * | s1, |
const char * | s2, | ||
int | n | ||
) |
文字列s1の末尾に文字列s2をN文字(Byte)分、結合する。
処理の流れは、以下の通り。
Step1. 文字列s1のNULL終端'\0'までポインタを進める。
Step2. 文字列s1のNULL終端の位置から文字列s2を一文字ずつ連結する。
Step3. N+1回目にNULL終端を付与する。
[in,out] | s1 | 結合先の文字列 |
[in] | s2 | 結合する文字列 |
[in] | n | 結合する文字数(Byte) |
Referenced by dns_geta(), getdev(), main(), xsh_arp(), xsh_cat(), xsh_date(), xsh_help(), xsh_kill(), xsh_ls(), xsh_memdump(), xsh_memstat(), xsh_netinfo(), xsh_ping(), xsh_ps(), xsh_sleep(), xsh_udpdump(), xsh_udpecho(), xsh_udpeserver(), and xsh_uptime().
char* strncpy | ( | char * | s1, |
const char * | s2, | ||
int | n | ||
) |
文字列s1に文字列s2をN文字(Byte)分コピーする。
自動でNULL終端('\0')は付与しない。
また、N Byteコピーする前にNULL終端に達した場合、残りのByte数分をNULL終端で埋める。
[in,out] | s1 | コピー先の文字列 |
[in] | s2 | コピー元の文字列 |
[in] | n | コピーする文字数(Byte) |
Definition at line 15 of file strncpy.c.
Referenced by newtype(), sysinit(), and tftpget_mb().
int32 strnlen | ( | const char * | s, |
unsigned int | len | ||
) |
NULL終端された文字列の長さを返す。NULL終端は長さに含まない。
[in] | s | 長さを調べる対象の文字列 |
[in] | len | 読み取る長さの最大長(Byte) |
Definition at line 14 of file strnlen.c.
Referenced by tftpget_mb(), xsh_help(), and xsh_udpecho().
char* strrchr | ( | const char * | s, |
int | c | ||
) |
文字列の後方から指定された文字を探し、最後に見つかった位置をポインタで返す。
[in] | s | 探索対象の文字列 |
[in] | c | 検索文字 |