字符串操作-字符串截取

Benchmark created on


Setup

const str = '0123456789'

Test runner

Ready to run.

Testing in
TestOps/sec
slice方法字符串截取
const newStr = str.slice(0,7)
ready
substring方法字符串截取
const newStr = str.substring(0,7)
ready

Revisions

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