Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NSMutableStringProgram
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//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; }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.33 sec, absolute running time: 0.13 sec, cpu time: 0.09 sec, memory peak: 9 Mb, absolute service time: 0,47 sec
edit mode
|
history
|
discussion