i have an UITextField which is allowing space
using the following code snippet it trims all the white space from the string (Text Field Text)
NSCharacterSet *whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
NSString *trimmed = [rawString stringByTrimmingCharactersInSet:whitespace];
but i want to trim only the starting space of the Text that means
Example: @” SAMPLE TEXT”= @”SAMPLE TEXT”
can any one help me how to achieve this
First find the first character that is not a whitespace or newline. Then create a substring from that character’s location and onwards.