Yes. It is ugly. It's disgusting. But there wasn't any other way.

See, you might need strchr for constant strings and you might need it for non-constant strings. In C there is no way to...