appending(_:)
Returns a new string made by appending a given string to the receiver.
Declaration
func appending(_ aString: String) -> StringParameters
- aString:
The string to append to the receiver. This value must not be
nil.
Return Value
A new string made by appending aString to the receiver.
Discussion
This code excerpt, for example:
NSString *errorTag = @"Error: ";
NSString *errorString = @"premature end of file.";
NSString *errorMessage = [errorTag stringByAppendingString:errorString];produces the string “Error: premature end of file.”.