Previous Index Next

BridgePlus.framework, SMSForder Class Methods

Category

String manipulation methods

Method

transformedFrom:ICUTransform:inverse:

Summary

Apply an ICU transform. See http:/userguide.icu-project.org/transforms/general

Signature

+ (id)transformedFrom:(id)listOrString ICUTransform:(NSString *)transformName inverse:(BOOL)invertFlag

Parameters

listOrString = a string or list of strings

transformName = name of an ICU transform

invertFlag = whether to do an inverted transform

Result

If passed a string, returns the transformed string; if passed a list, an array of transformed strings. If the transform cannot be performed, returns missing value.

Availability

Version 1.0.0

Notes

 

Sample

use scripting additions

use framework "Foundation"

use script "BridgePlus"

load framework


set aString to "Takaaki Naganoya"

set theResult to current application's SMSForder's transformedFrom:aString ICUTransform:"Latin-Katakana" inverse:false

ASify from theResult

--> "タカアキ ナガノヤ"

theResult as text

--> "タカアキ ナガノヤ"


set theResult to current application's SMSForder's transformedFrom:(words of aString) ICUTransform:"Latin-Katakana" inverse:false

ASify from theResult

--> {"タカアキ", "ナガノヤ"}

theResult as list

--> {"タカアキ", "ナガノヤ"}


Click here to open script in a script editor