Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NSMutableStringProgram
//gcc 5.0.4 #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; //NSArray *girls = [NSArray arrayWithObjects:@"Ami",@"palak",nil]; // NSLog (@"Hello, %@",[girls objectAtIndex:1]); NSLog (@"Full Name Print"); NSMutableString *fullname = [NSMutableString stringWithString:@"Prakash Prafulbhai Gujarati"]; NSLog (@"%@",fullname); //NSMutableString *fullname = [NSMutableString stringWithString:@"Prakash Prafulbhai Gujarati"]; NSArray *name = [fullname componentsSeparatedByString:@" "]; NSLog (@"%@",[name objectAtIndex:2]); NSRange searchResult = [fullname rangeOfString:[name objectAtIndex:2]]; [fullname deleteCharactersInRange:NSMakeRange(searchResult.location, searchResult.length)]; NSLog (@"%@",fullname); [fullname insertString:[[name objectAtIndex:2] stringByAppendingString:@" "] atIndex:0]; NSLog (@"%@",fullname); NSRange searchResult1 = [fullname rangeOfString:[name objectAtIndex:1]]; [fullname deleteCharactersInRange:NSMakeRange(searchResult1.location+1, searchResult1.length)]; [fullname appendString:@"."]; NSLog (@"%@",fullname); [pool drain]; return 0; }
run
|
edit
|
history
|
help
0
if con boleanos 01
Class implementation
objective c fibonanci
linear hybrid cellular automaton reversible random bit generator
asdfghjk
NSString & MutableNSString Examples in one
string
find maximum in objective c
nsset
add