Method Reference: string.strcat

string: newstr = strcat (str1, str2, …)

Horizontal concatenation of texts in string array.

newstr = strcat (str1, str2, …) merges horizontally all the input arguments into a string array, as long as any of the input arguments is a string array. All inputs must be of common size or scalars. All inputs must be character vectors, cell arrays of character vectors, or string arrays.

Source Code: string

Example: 1

strcat concatenates strings horizontally, element-wise across its inputs.

 name = string ({'Ann'; 'Bob'})
name =
  2x1 string array

    "Ann"    
    "Bob"
 strcat (name, ' Smith')
ans =
  2x1 string array

    "Ann Smith"    
    "Bob Smith"