34,333
edits
Changes
→Appending Text to the End of a String
== Appending Text to the End of a String ==
Text can be appended to the end of an existing string object using the ''appendString'' method. This method directly modifies the string object on which the method is called and as such is only available for mutable string objects.
<pre>
NSMutableString *string1 = [NSMutableString stringWithString: @"The quick brown fox jumped"];
[string1 appendString: @" over the lazy dog"];
NSLog (@"string1 = %@", string1);
</pre>
== Comparing Strings ==