strcat
- :
str =strcat(s1, s2, …)¶ Join strings end to end.
Character arguments are joined after their trailing white space has been removed; leading white space is kept. A numeric argument contributes the characters with those codes. When any argument is a cell array of strings the result is a cell array, each cell holding the concatenation for that position, and the contents of cells are joined as they are, with no white space removed. Character matrices are joined row by row and padded to a common width.
strcat ("[", " keeps leading blanks", "]") ⇒ [ keeps leading blanks] strcat ("[", "drops trailing blanks ", "]") ⇒ [drops trailing blanks] strcat ("x", " ", "y") ⇒ xy strcat (["ab"; "cde"], "-") ⇒ "ab- " "cde-" strcat ({"ab"; "cd "}, "-") ⇒ { [1,1] = ab- [2,1] = cd - }