Anadromes: Difference between revisions
m
→{{header|AppleScript}}: Minor optimisation.
m (→{{header|AppleScript}}: Nicer logic in the second repeat.) |
m (→{{header|AppleScript}}: Minor optimisation.) |
||
Line 153:
set theText to |⌘|'s class "NSString"'s stringWithContentsOfFile:(textFile's POSIX path) ¬
usedEncoding:(missing value) |error|:(missing value)
--
set theText to theText's stringByReplacingOccurrencesOfString:("(?m)^.{0," & minLength - 1 & "}\\R") withString:("") ¬
options:(|⌘|'s NSRegularExpressionSearch) range:({0, theText's |length|()})
-- Get the remaining paragraphs as an array.
set wordArray to
-- Derive a list of
script o
property wordList : (wordArray) as list
end script
set astid to AppleScript's text item delimiters
|