Hacker News new | ask | show | jobs
by mystified5016 370 days ago
See my other comment.

You can do extremely trivial binary checks on ASCII, UTF-8 (and most? other) encoding schemes. All vowels including W and Y contain a 1 in the lowest bit. Then by comparing bits 1-4, you can do a trivial case-insensitive comparison. You detect case by checking bit 5. 0 is upper, 1 is lower.

1 comments

How does that fly with foreign scripts? It certainly won't work with Greek, Arabic, Korean, Chinese, Japanese and the Indian languages.
Again, this isn't really about detecting vowels; it is exactly about detecting upper- and lower-case examples of the characters a, e, i, o, and u.

Language is not an issue; ø and é are not considered "vowels" by this article (nor is y).

Sure, there is only ASCII, and nobody needs more. ø and é are not considered "vowels", ha!