This is my C/C++ bleeding through. A micro-optimisation at best, and habit at worst. I'm happy to change this though. Is there an `endsWith` too?