Sanjay
Sanjay

Reputation: 65

UPPERCASE Characters Convert to Case Sensitive in Iphone

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

Answers (3)

Pragnesh Dixit
Pragnesh Dixit

Reputation: 449

You have to use NSString function "capitalizedString" for this. NSString *fooUpper = [foo capitalizedString];

Upvotes: 1

Narayanan Ramamoorthy
Narayanan Ramamoorthy

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

P.J
P.J

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

Related Questions