Previous Index Next

BridgePlus.framework, SMSForder Class Methods

Category

String manipulation methods

Method

arrayFromTSV:

Summary

Converts tab-separated values to a list of lists

Signature

+ (NSArray *)arrayFromTSV:(NSString *)aString

Parameters

aString = a tab-delimited string

Result

An array of arrays

Availability

Version 1.0.0

Notes

 

Sample

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"}}


Click here to open script in a script editor