Created
December 16, 2020 17:26
-
-
Save xrrocha/3f876d7cf55fb96623760e24e5b38715 to your computer and use it in GitHub Desktop.
code block for README-28
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
package wscrambler | |
object WordScrambler { | |
private val WORD_REGEX = | |
"""\p{IsLatin}(\p{IsLatin})\1*(?!\1)\p{IsLatin}\p{IsLatin}+""".toRegex() | |
@JvmStatic // JVM static method | |
// CLI FQN: wscrambler.Scrambler | |
fun main(args: Array<String>) { | |
println(scrambleWords( | |
args.joinToString(" ")) | |
} | |
fun scrambleWords(text: String) { | |
// Scrambling logic goes here... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment