AppleScript名:指定文字列前後から空白や改行を削除 |
— Created 2018-01-29 by Takaaki Naganoya — 2018 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aStr to " aaaaaa " set aString to current application’s NSString’s stringWithString:aStrset bStr to (aString’s stringByTrimmingCharactersInSet:(current application’s NSCharacterSet’s whitespaceAndNewlineCharacterSet())) return bStr as string –> "aaaaaa" |
More from my site
(Visited 338 times, 1 visits today)