Previous | Index | Next |
Substring extraction methods
charactersOfString:
"character" means "composed character sequence", as in AppleScript. Useful if you have an NSString, so you don’t have to convert to a string first.
+ (NSArray *)charactersOfString:(NSString *)aString
aString = Typically an NSString
An array of strings
Version 1.0.0
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set aString to "This is a string"
set theResult to current application's SMSForder's charactersOfString:aString
ASify from theResult
--> {"T", "h", "i", "s", " ", "i", "s", " ", "a", " ", "s", "t", "r", "i", "n", "g"}
theResult as list
--> {"T", "h", "i", "s", " ", "i", "s", " ", "a", " ", "s", "t", "r", "i", "n", "g"}