Checks if string starts with

Benchmark created on


Setup

const a = "abcdefg"
const b = "abc";

Test runner

Ready to run.

Testing in
TestOps/sec
findIndex
a.indexOf(b) === 0;
ready
startsWith
a.startsWith(b)
ready

Revisions

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