AppleScript名:listをフィルターする(指定文字ではじまる要素) |
— Created 2014-12-28 by Takaaki Naganoya — 2014 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 bArray to (stringArray’s filteredArrayUsingPredicate:thePred) as list –> {"adobe"} |
More from my site
(Visited 17 times, 1 visits today)