remove first char from string

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
A
var str = "abc";
var newstr = str.substring(1, str.length);
ready
B
var str = "abc";
var newstr = str.substr(1, str.length - 1);
ready
C
var str = "abc";
var newstr = str.substr(1, str.length);
ready
D
var str = "abc";
var newstr = str.replace(/^./, '');
ready
E
var str = "abc";
var newstr = str.slice(1);
ready
F
var str = "abc";
var newstr = str.substring(1);
ready

Revisions

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