I toyed with multiple designs and I chose this one because it doesn't drag in regular expressions and depends on the whole Unicode implementation for a simple utility method.
It isn't the first time I wanted to bootstrap Scala and `scala.util.Properties` managed to depend on everything it managed to grab.

The code doesn't look nice, but it is self-contained. Other options?