Re-written string character category functions