How to replace a character in NSString without inserting a space?

I just ran the following as a test

NSString * myString = @"Hello,";

NSString * newString = [myString stringByReplacingOccurrencesOfString:@"," withString:@""];

NSLog(@"%@xx",newString);

And I get 2010-04-05 18:51:18.885 TestString[6823:a0f] Helloxx as output. There is no space left.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)