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[cd] ’A’" set bList to (stringArray’s filteredArrayUsingPredicate:thePred) as list –> {"adobe", "Apple"} |
More from my site
(Visited 42 times, 1 visits today)