User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:foundation.framework:nsstring.h:stringbyappendingstring
click
to support this page (eg 0,42 € or so) Thanks.

stringByAppendingString

    -(NSString *)stringByAppendingString:(NSString *)aString;    

Returns a new string made by appending a given string to the receiver.

ObjC Sourcecode Example

  NSString *cycle=@"Pass";
 
        for(int a=0; a<5; a++)
        {
 
            NSString *intValue=[NSString stringWithFormat:@"%i", a];
 
            cycle=[cycle stringByAppendingString:intValue];
 
            NSLog(@"%@", cycle);
 
        }

Output for this example code

output:

 
2012-04-15 12:08:02.994 FoundationNSString[633:403] Pass0
2012-04-15 12:08:02.998 FoundationNSString[633:403] Pass01
2012-04-15 12:08:02.998 FoundationNSString[633:403] Pass012
2012-04-15 12:08:03.000 FoundationNSString[633:403] Pass0123
2012-04-15 12:08:03.001 FoundationNSString[633:403] Pass01234 
advertising
objective-c/foundation.framework/nsstring.h/stringbyappendingstring.txt · Last modified: 2012/12/20 12:24 (external edit)

Impressum