Change e letters to i in words: Difference between revisions
m
→AppleScript :: Functional
Line 333:
filteredArrayUsingPredicate:(containsChar("i")))
set possibles to (allReplaced(
(eWords's componentsJoinedByString:(linefeed))))'s ¬
stringByReplacingOccurrencesOfString:("e") ¬▼
withString:("i"))'s ¬▼
componentsSeparatedByString:(linefeed)
set possibleSet to ca's NSMutableSet's setWithArray:(possibles)
Line 371 ⟶ 369:
ieTwins(readFile("~/Desktop/unixdict.txt"))))
end run
------------------------- GENERIC ------------------------
-- allRplaced :: String -> String -> NSString -> NSString
on allReplaced(needle, replacement, haystack)
end allReplaced
-- containsChar :: Char -> NSPredicate
|