How to change the case of letters

2009-05-04 Thread rethish
Hi, I am using the action methods uppercaseWord: and lowercaseWord: to change the case of selected word. -(IBAction)changecase:(id)sender { if([[fontCasePopup titleOfSelectedItem] isEqualToString:@"A"]) { [textView uppercaseWord:sender]; } else if([[fontCasePopup titleOfSele

Re: How to change the case of letters

2009-05-04 Thread Тимофей Даньшин
It looks like, if you want to change the case of a particular letter (say, all occurrences, letter "a"), you will have to iterate through all the chars in your textView, check if they are "a"s, if they are upper or lower case, and change their case accordingly. That is, if I understood your

Re: How to change the case of letters

2009-05-04 Thread rethish
Hi Thank you reply. Actually I want to change the case of letters in a particular range of selection. That is, when I select a range of text from a textview , that selection must be changed depending upon my action. Thank you On 5/5/09 2:21 AM, "Тимофей Даньшин" wrote: > It looks like, if

Re: How to change the case of letters

2009-05-04 Thread Graham Cox
On 05/05/2009, at 3:04 PM, rethish wrote: Actually I want to change the case of letters in a particular range of selection. [textView replaceCharactersInRange:[textView selectedRange] withString: [[[textView string] substringWithRange:[textView selectedRange] uppercaseString]]; Pick th

Re: How to change the case of letters

2009-05-05 Thread Deborah Goldsmith
Note that this will do a non-language-sensitive case conversion. If you care about handling languages like Turkish correctly, use CFStringUppercase. Deborah Goldsmith Apple Inc. golds...@apple.com On May 4, 2009, at 10:13 PM, Graham Cox wrote: On 05/05/2009, at 3:04 PM, rethish wrote: Ac

Re: How to change the case of letters

2009-05-05 Thread Kyle Sluder
On Tue, May 5, 2009 at 5:31 PM, Deborah Goldsmith wrote: > Note that this will do a non-language-sensitive case conversion. If you care > about handling languages like Turkish correctly, use CFStringUppercase. This brings up a question I've had for a while. I would like to file an enhancement re