Changes

Jump to: navigation, search

Working with String Objects in Objective-C

424 bytes added, 20:54, 3 November 2009
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 ==

Navigation menu