#import <Foundation/Foundation.h>

 

int main(int argc, const char * argv[]) {

    @autoreleasepool {

        NSString* str = @"abc123.xyz789";

        NSInteger len = [str length];

        NSMutableString* reverse = [NSMutableString string];

        for(NSInteger i=len-1;i>=0;i--)

        {

            unichar c = [str characterAtIndex:i];

            NSString* temp = [NSString stringWithCharacters:&c length:1];

            [reverse appendString:temp];

        }

        NSLog(@"%@",reverse);

    }

    return 0;

}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-05
  • 2021-11-17
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
猜你喜欢
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-03-09
  • 2021-06-07
相关资源
相似解决方案