![]() |
VOOZH | about |
Swift language supports different types of generic collections and a string is one of them. A string is a collection of alphabets. In the Swift string, we add a string value to another string. To do this task we use the append() function. This function is used to add a string value to another string. It will return the appended string.
Syntax:
string.append(str: String)
Here string is an object of the String class.
Parameters: This function accepts a parameter that is illustrated below:
Return Value: This function returns an appended string.
Example 1:
Output:
GeeksforGeeks
Example 2:
Output:
GeeksforGeeks is a CS Portal.