Skip to content

Instantly share code, notes, and snippets.

@mlc
Created November 23, 2017 00:09
Show Gist options
  • Save mlc/0562f0403daba4151c2c8b6156fd2a50 to your computer and use it in GitHub Desktop.
Save mlc/0562f0403daba4151c2c8b6156fd2a50 to your computer and use it in GitHub Desktop.
val fifthGlyphs = charArrayOf(
'\u0065', '\u00D8' + 16, '\u00D9' + 16, '\u00DA' + 16, '\u00DB' + 16, '\u0113', '\u0117', '\u0119', '\u025B', '\u01DD',
'\u0045', '\u00C8', '\u00C9', '\u00CA', '\u00CB', '\u0112', '\u0116', '\u0118', '\u018D' + 1, '\u0190')
fun main(args: Array<String>) {
val concat = args.joinToString()
var msg : String = "your string isn't containing any nasty fifth glyphs"
if (concat.any { ch -> fifthGlyphs.contains(ch) })
msg = "oh no! a bad symbol!"
println(msg)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment