Previous | Index | Next |
String manipulation methods
transformedFrom:ICUTransform:inverse:
Apply an ICU transform. See http:/userguide.icu-project.org/transforms/general
+ (id)transformedFrom:(id)listOrString ICUTransform:(NSString *)transformName inverse:(BOOL)invertFlag
listOrString = a string or list of strings
transformName = name of an ICU transform
invertFlag = whether to do an inverted transform
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.
Version 1.0.0
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
--> {"タカアキ", "ナガノヤ"}