Fastest way to get array of NSRange objects for all uppercase letters in an NSString?
Posted
by
Bama91
on Stack Overflow
See other posts from Stack Overflow
or by Bama91
Published on 2011-01-11T01:06:04Z
Indexed on
2011/01/11
5:53 UTC
Read the original article
Hit count: 188
I need NSRange objects for the position of each uppercase letter in a given NSString for input into a method for a custom attributed string class.
There are of course quite a few ways to accomplish this such as rangeOfString:options: with NSRegularExpressionSearch or using RegexKitLite to get each match separately while walking the string.
What would be the fastest performing approach to accomplish this task?
© Stack Overflow or respective owner