Deleting Whitespace Sharacters in NSString


NSString *cleanString=[currentString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];

    //converts @"ab cd \n ssd" to @"abcdssd"


No comments:

Post a Comment