IOS changes the case sensitivity of letters, and iOS letters

Source: Internet
Author: User

IOS changes the case sensitivity of letters, and iOS letters

Use lowercaseString and uppercaseString

- (void)test{    NSString *testString = @"Hello World";        // lower case    NSString *lowerCaseString1 = [testString lowercaseString];    NSString *lowerCaseString2 = testString.lowercaseString;        // upper case    NSString *upperCaseString1 = [lowerCaseString1 uppercaseString];    NSString *upperCaseString2 = lowerCaseString1.uppercaseString;        NSLog(@"lowerCaseString1: %@",lowerCaseString1);    NSLog(@"lowerCaseString2: %@",lowerCaseString2);    NSLog(@"upperCaseString1: %@",upperCaseString1);    NSLog(@"upperCaseString2: %@",upperCaseString2);        // capitalize the first word of the sentence    NSString *txt = @"hi my friends!";    txt = [txt stringByReplacingCharactersInRange:NSMakeRange(0,1) withString:[[txt substringToIndex:1] uppercaseString]];    NSLog(@"txt: %@", txt);}

Print result:

2014-08-26 17:00:30.266 MyApp[68821:60b] lowerCaseString1: hello world2014-08-26 17:00:30.267 MyApp[68821:60b] lowerCaseString2: hello world2014-08-26 17:00:30.267 MyApp[68821:60b] upperCaseString1: HELLO WORLD2014-08-26 17:00:30.267 MyApp[68821:60b] upperCaseString2: HELLO WORLD2014-08-26 17:00:30.268 MyApp[68821:60b] txt: Hi my friends!

Reference Source:

Http://stackoverflow.com/questions/8693741/converting-all-text-to-lower-case-in-objective-c

Http://stackoverflow.com/questions/2432452/how-to-capitalize-the-first-word-of-the-sentence-in-objective-c


How can I change uppercase and lowercase letters in EXCEL?

Assume that column A is the original content and input = UPPER (A1) in B1)
Press enter, select B1, move the cursor to the lower right corner, and double-click the "+" icon ".

This is in upper case and LOWER case = LOWER (A1)

What is the difference between IOS and iOS in Case sensitivity?

I pad my Padi watch my watch I phone my mobile Phone I OS (I phone OS) my mobile Phone's operating system because OS, the operating system is generally capitalized, therefore, iOS has a certain trademark meaning. In fact, writing IOS and ios is exactly the same (if you think that the WTO and wto, Windows and win, if there is no difference in Win), some people will be a bit like being fooled to sell Amway after buying Apple .. To say that the product is not perfect or wrong, there is a kind of pathological trial, just ignore this kind of person.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.