NSString stringByApplyingTransform

[stringByApplyingTransform]Script/Language

General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general

Script/Language
Arabic
Armenian
Bopomofo
Cyrillic
Georgian
Greek
Han
Hangul
Hebrew
Hiragana
Indic
Jamo
Katakana
Syriac
Thaana
Thai



#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "ウツクシイニホンゴABCDEFG1234567890" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)

(*
Script/Language
Arabic
Armenian
Bopomofo
Cyrillic
Georgian
Greek
Han
Hangul
Hebrew
Hiragana
Indic
Jamo
Katakana
Syriac
Thaana
Thai
*)

set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Katakana-Hiragana" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Fullwidth-Halfwidth

全角→半角
General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general


#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "ウツクシイニホンゴABCDEFG1234567890" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)

set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Fullwidth-Halfwidth" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Latin-ASCII

General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general



#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "àáâãäå" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)

set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Latin-ASCII" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform] Normalization

General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general


#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "ABCDEFGHIJK abcdefghijk 1234567890" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)

(*
Normalization
Any-NFD
Any-NFC
Any-NFKD
Any-NFKC
Any-FCD
Any-FCC
*)

set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Any-NFD" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Any-Title

先頭だけ大文字
General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general



#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "ABCDEFGHIJK abcdefghijk" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)


set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Any-Title" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Any-Upper

全部Caps大文字に
General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general


#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "ABCDEFGHIJK abcdefghijk" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)


set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Any-Upper" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Any-Lower

全部小文字
General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general


#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "ABCDEFGHIJK abcdefghijk" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)


set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Any-Lower" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Any-Remove

全部とり
General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general



#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "美しい日本語" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)


set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Any-Remove" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Any-Null

なにもしない
General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general



#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "美しい日本語" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)


set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Any-Null" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text



#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

[stringByApplyingTransform]Any-Name

General Transforms
https://sites.google.com/site/icuprojectuserguide/transforms/general


#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#ユニコードエスケープされている文字列を
#読める形に戻す
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7

use AppleScript version "2.6"
use framework "Foundation"
use scripting additions

######ログ表示
doLogView()

property objMe : a reference to current application
property objNSString : a reference to objMe's NSString


set strText to "美しい日本語" as text

set ocidNSStringText to objNSString's stringWithString:strText
log ocidNSStringText as text
log ocidNSStringText's className() as text
-->(*__NSCFString*)


set ocidApplyText to (ocidNSStringText's stringByApplyingTransform:"Any-Name" |reverse|:false)
log ocidApplyText as text
log ocidApplyText's className() as text
-->(*__NSCFString*)


return ocidApplyText as text
-->"\\N{CJK UNIFIED IDEOGRAPH-7F8E}\\N{HIRAGANA LETTER SI}\\N{HIRAGANA LETTER I}\\N{CJK UNIFIED IDEOGRAPH-65E5}\\N{CJK UNIFIED IDEOGRAPH-672C}\\N{CJK UNIFIED IDEOGRAPH-8A9E}"




#########################ログ表示
to doLogView()

tell application "System Events"
set listAppList to title of (every process where background only is false)
end tell
repeat with objAppList in listAppList
set strAppList to objAppList as text
if strAppList is "スクリプトエディタ" then
tell application "Script Editor"
if frontmost is true then
try
tell application "System Events" to click menu item "ログを表示" of menu "表示" of menu bar item "表示" of menu bar 1 of application process "Script Editor"
end try
end if
end tell
end if
end repeat

end doLogView
#########################

|

その他のカテゴリー

Accessibility Acrobat Acrobat 2020 Acrobat AddOn Acrobat Annotation Acrobat ARMDC Acrobat AV2 Acrobat BookMark Acrobat Classic Acrobat DC Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat JS Acrobat Manifest Acrobat Menu Acrobat Open Acrobat Plugin Acrobat Preferences Acrobat Preflight Acrobat python Acrobat Reader Acrobat SCA Acrobat SCA Updater Acrobat Sequ Acrobat Sign Acrobat Stamps Acrobat Watermark Acrobat Windows Acrobat Windows Reader Admin Admin Account Admin Apachectl Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Mobileconfig Admin Permission Admin Pkg Admin Power Management Admin Printer Admin SetUp Admin SMB Admin Support Admin System Information Admin Tools Admin Users Admin Volumes Adobe Adobe FDKO Adobe RemoteUpdateManager AppKit Apple AppleScript AppleScript do shell script AppleScript List AppleScript ObjC AppleScript Osax AppleScript PDF AppleScript Pictures AppleScript record AppleScript Script Editor AppleScript Script Menu AppleScript Shortcuts AppleScript Shortcuts Events AppleScript System Events AppleScript System Events Plist AppleScript Video Applications AppStore Archive Attributes Automator BackUp Barcode Barcode QR Barcode QR Decode Bash Basic Basic Path Bluetooth BOX Browser Calendar CD/DVD Choose Chrome CIImage CityCode CloudStorage Color com.apple.LaunchServices.OpenWith Console Contacts CotEditor CURL current application Date&Time delimiters Desktop Device Diff Disk Dock DropBox Droplet eMail Encode % Encode Decode Encode UTF8 Error EXIFData ffmpeg File Finder Firefox Folder FolderAction Fonts GIF github Guide HTML HTML Entity Icon Illustrator Image Events Image2PDF ImageOptim iPhone iWork Javascript Jedit Json Label Leading Zero List locationd LRC lsappinfo LSSharedFileList m3u8 Mail MakePDF Map Math Media Media AVAsset Media AVconvert Media AVFoundation Media AVURLAsset Media Movie Media Music Memo Messages Microsoft Microsoft Edge Microsoft Excel Mouse Music NetWork Notes NSArray NSArray Sort NSBezierPath NSBitmapImageRep NSBundle NSCFBoolean NSCharacterSet NSColor NSColorList NSData NSDecimalNumber NSDictionary NSError NSEvent NSFileAttributes NSFileManager NSFileManager enumeratorAtURL NSFont NSFontManager NSGraphicsContext NSImage NSIndex NSKeyedArchiver NSKeyedUnarchiver NSLocale NSMutableArray NSMutableDictionary NSMutableString NSNotFound NSNumber NSOpenPanel NSPasteboard NSpoint NSPredicate NSPrintOperation NSRange NSRect NSRegularExpression NSRunningApplication NSScreen NSSize NSString NSString stringByApplyingTransform NSStringCompareOptions NSTask NSTimeZone NSURL NSURL File NSURLBookmark NSURLComponents NSURLResourceKey NSURLSession NSUserDefaults NSUUID NSView NSWorkspace Numbers OAuth OneDrive PDF PDFAnnotation PDFAnnotationWidget PDFContext PDFDisplayBox PDFDocumentPermissions PDFImageRep PDFKit PDFnUP PDFOutline perl Photoshop PlistBuddy pluginkit postalcode PostScript prefPane Preview Python QuickLook QuickTime ReadMe Regular Expression Reminders ReName Repeat RTF Safari SaveFile ScreenCapture ScreenSaver SF Symbols character id SF Symbols Entity sips Skype Slack Sound Spotlight sqlite SRT StandardAdditions Swift System Settings TCC TemporaryItems Terminal Text Text CSV Text MD Text TSV TextEdit Tools Translate Trash Twitter Typography UI Unit Conversion UTType valueForKeyPath Video VisionKit Visual Studio Code VMware Fusion Wacom webarchive webp Wifi Windows XML XML EPUB XML OPML XML Plist XML RSS XML savedSearch XML SVG XML TTML XML webloc XML XMP YouTube zoom