isHex

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
with regex
return "0123456789abcdef".match(/^[a-z0-9]$/i);
ready
with negated regex
return "0123456789abcdef".match(/[^a-z0-9]/i);
ready
with contains
for(let c of "0123456789abcdef".toLowerCase().split("")) {
	if( !"0123456789abcdef".includes(c))
	return false;
}


return true;
ready
case sensitive regex
return "0123456789aBcDeF".toLowerCase().match(/^[a-z0-9]$/);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.