Tech News
← Back to articles

The fastest way to detect a vowel in a string

read original related products more articles

Austin Z. Henley Associate Teaching Professor

Carnegie Mellon University [email protected]

@austinzhenley

github/AZHenley

The fastest way to detect a vowel in a string

6/13/2025

I was nerdsniped recently: What is the best way to detect if a string has a vowel in it?

This is trivial, right?

But as I started getting into it, I realized there is much more to this. I challenged myself to come up with as many ways to detect a vowel as possible. I even asked a few friends to give it a go. Which is the fastest? Which should never be used? Which is the most clever?

... continue reading