Previous | Index | Next |
Substring range methods
rangesOfSentencesOfString:
Ignores localization.
+ (NSArray *)rangesOfSentencesOfString:(NSString *)aString
aString = a string
An array of range values
Version 1.2.0
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set aString to "This is a string. It has two sentences."
set theResult to current application's SMSForder's rangesOfSentencesOfString:aString
ASify from theResult
--> {{location:0, length:18}, {location:18, length:21}}
theResult as list
--> {{location:0, length:18}, {location:18, length:21}}