I need to remove spaces from the end of a string. How can I do that? Example: if string is \"Hello \" it must become \"Hello\"
\"Hello \"
\"Hello\"
NSString* NSStringWithoutSpace(NSString* string) { return [string stringByReplacingOccurrencesOfString:@" " withString:@""]; }