Reputation: 65
In my Project there are some names which coming from Database But Problem is that all characters are coming in uppercase(as if i store in uppercase) but i want that characters should come like this....
SANJAY YADAV "Sanjay Yadav"
It Should be Case Sensitive
Thanks in Advance..
Upvotes: 1
Views: 5656
Reputation: 449
You have to use NSString function "capitalizedString" for this. NSString *fooUpper = [foo capitalizedString];
Upvotes: 1
Reputation: 826
check this : Change the first character in each word of a string to uppercase
if it doesn't work then convert all letters to lowercase and then do the above url
Upvotes: 0
Reputation: 6587
You can make all your text in upper case / lower case and then do your code
NSString *username1 = [userName uppercaseString];
NSString *username1 = [userName lowercaseString];
Note: userName is NSString
Hope it helps...
Upvotes: 7