Previous | Index | Next |
String manipulation methods
arrayFromTSV:
Converts tab-separated values to a list of lists
+ (NSArray *)arrayFromTSV:(NSString *)aString
aString = a tab-delimited string
An array of arrays
Version 1.0.0
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set aString to "1 2 3" & linefeed & "4 5 6" & linefeed & "7 8 9" -- tab delimited
set theResult to current application's SMSForder's arrayFromTSV:aString
ASify from theResult
--> {{"1", "2", "3"}, {"4", "5", "6"}, {"7", "8", "9"}}
theResult as list
--> {{"1", "2", "3"}, {"4", "5", "6"}, {"7", "8", "9"}}