Created
August 10, 2023 00:32
-
-
Save jjhop/927a1ab4526d64d7beb455b2691c53d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set<String> calledMethods = new Hashset<>() | |
new File(baseDir,"haiku.txt").withReader { reader -> | |
while (reader.readLine()) { | |
if (line.contains(') >>>>')) { | |
String[] splittedLine = line.split('>>>>', 2) | |
String l = splittedLine[0] | |
String rest = l.substring(l.indexOf('#')) | |
calledMethods.add(rest) | |
} | |
} | |
} | |
new File(baseDir,'haiku.txt').withWriter('utf-8') { writer -> | |
calledMethods.toList().sort().each { it -> | |
writer.write(it) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment