【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.2.24 lstrcat
Contents
Description
The lstrcat (alias strcat) function appends one string to another.
Syntax
LPSTR lstrcat( LPSTR lpString1, LPCSTR lpString2 )
Parameters
- lpString1
- [modify]Pointer to a null-terminated string. The buffer must be large enough to contain both strings.
- lpString2
- [input]Pointer to the null-terminated string to be appended to the string specified in the lpString1 parameter.
Return
If the function succeeds, the return value is a pointer to the modified string. If the function fails, the return value is NULL.
Examples
EX1
void lstrcat_ex1() { char *ptr = NULL; char szStr[80] = "This is the first part. "; string str1 = "This is the second part."; ptr = lstrcat(szStr, str1); if(0 == strcmp(ptr, "This is the first part. This is the second part.")) printf("the string after the concatenation is \"%s\" \n" , szStr); else printf("concatenation failed \n"); }
Remark
See Also
Header to Include
origin.h