Ported Go-version char class util functions