XINU
|
文字列s1の末尾に文字列s2をN文字(Byte)分、結合する。 More...
Go to the source code of this file.
Functions | |
char * | strncat (char *s1, const char *s2, int n) |
文字列s1の末尾に文字列s2をN文字(Byte)分、結合する。 More... | |
文字列s1の末尾に文字列s2をN文字(Byte)分、結合する。
Definition in file strncat.c.
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) |