Tuesday, February 19, 2013

Reverse of string in objective C


- (NSString*)reverseString:(NSString*)string
{
   NSMutableString *reversedString;
   int length     = [string length];
   reversedString = [NSMutableString stringWithCapacity:length];
   while (length--) 
   {
      [reversedString appendFormat:@"%C", [string   characterAtIndex:length]];
   }
  return reversedString;
}

No comments:

Create a list in SwiftUI with sticky section headers

 Sample Code import SwiftUI struct ContentView : View {     @State var isCustomViewControllerDisplayed = false     @State private va...