diff options
Diffstat (limited to 'src/main/kotlin/util/StringUtil.kt')
-rw-r--r-- | src/main/kotlin/util/StringUtil.kt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/kotlin/util/StringUtil.kt b/src/main/kotlin/util/StringUtil.kt new file mode 100644 index 0000000..d9253cb --- /dev/null +++ b/src/main/kotlin/util/StringUtil.kt @@ -0,0 +1,9 @@ +package moe.nea.firmament.util + +object StringUtil { + fun String.words(): Sequence<String> { + return splitToSequence(" ") // TODO: better boundaries + } + + fun Iterable<String>.unwords() = joinToString(" ") +} |