Iphone app's

Wednesday, 22 January 2014

Reverse A string

NSString *s=text.text;

    int i=[s length];
    NSMutableString *arr=[[NSMutableString alloc]initWithCapacity:i];
    for ( int j=i-1; j>=0; j--) {
        [arr appendString:[NSString stringWithFormat:@"%c",[s characterAtIndex:j]]];
    }

    NSLog(@"%@",arr);
Posted by Yuva at 22:04
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

My photo
Yuva
View my complete profile

Blog Archive

  • ►  2018 (5)
    • ►  March (5)
  • ►  2017 (2)
    • ►  May (1)
    • ►  January (1)
  • ►  2015 (2)
    • ►  November (1)
    • ►  September (1)
  • ▼  2014 (43)
    • ►  December (1)
    • ►  September (1)
    • ►  May (6)
    • ►  February (7)
    • ▼  January (28)
      • scaling an image
      • Table Without CustomCell
      • Multiple CheckBox
      • Single Radio Button and Checkbox
      • Gesture Program
      • Create Grid
      • Reverse A string
      • Preference
      • PList
      • System Date And Time
      • SQL Without FMDB
      • SQL-FMDB
      • XML
      • Custom Cell
      • Counting the particular words
      • Distinct Item
      • Swap array objects
      • Dictionary Concepts
      • Map with MultipleAnnatation
      • Download a File
      • JSON
      • Tabbar Controller
      • Create programmatically view and controls
      • Replacing a path
      • Reverse a string.It contain list of names
      • Calculate Distance between two points
      • Adding String in NSString with specified index
      • Create a circle programmatically
Ethereal theme. Powered by Blogger.