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]; NSLog (@"Full Name Print"); NSMutableString *fullname = [NSMutableString stringWithString:@"Prakash Prafulbhai Gujarati"]; NSLog (@"%@",fullname); 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
geomatric operations in objective c
size of datatypes in objective c
Objective C NSSet Declaration
shape example
basic arithmatic Opreation in objective C
01 Hola mundo
floating in objective c
string combine
primitive datatypes objective c
string type cast