AppleScript名:指定文字列ではじまる要素のみ抽出 |
— Created 2017-10-29 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set stringArray to current application’s NSArray’s arrayWithArray:{"adobe", "Apple", "microsoft", "google"} set thePred to current application’s NSPredicate’s predicateWithFormat:"self BEGINSWITH ’a’" set bList to (stringArray’s filteredArrayUsingPredicate:thePred) as list –> {"adobe"} |
More from my site
(Visited 43 times, 1 visits today)