1. String connection function in C language:
strcat (target string, source string);
Append a copy of the source string to the target string, with the terminating null character in the target string overwritten by the first character of the source string, and concatenate the two strings to form a new string with a null character. In C, function prototypes exist in the
For example:
#include <stdio.h> #include <string.h> int main () { char str[80]; strcpy (str,"these "); strcat (str,"strings "); strcat (str,"are "); strcat (str,"concatenated."); puts (str); return 0; }
Print result:
these strings are concatenated.
2. String concatenation or merging function in EXCEL:
##Usage method: CONCATENATE (cells that need to be connected, Cells that need to be connected, cells that need to be connected...) Note: If there are other characters to be added in the middle (such as "-"), just add this character directly, but you must Add double quotes "" (also double quotes in English format). Example: Connect "school code", "college code" and "college number" to become "student number". The first one: concatenate the following strings; the second one: concatenate the following strings with "-".
Use connection Function:
##3. SQL string connection Function:
String connection function concat(str1,str2..) function direct connection
example:
The above is the detailed content of What are the string concatenation functions?. For more information, please follow other related articles on the PHP Chinese website!