Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array vs Regex Titlize
(version: 0)
Titleize
Comparing performance of:
Split String vs Regex
Created:
6 years ago
by:
Guest
Jump to the latest result
Tests:
Split String
'Mary has a little lamb'.split(' ').map(w => `${w.charAt(0).toUpperCase()}${w.slice(1)}`).join(' ')
Regex
'Mary has a little lamb'.replace(/^(.)|\s+(.)/g, c => c.toUpperCase())
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Split String
Regex
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
RegEx.test vs Array.includes
array vs regex 3
RegEx vs Array.includes
RegEx vs Array.includes v2
RegEx.test vs Array.includes — fork 1
Comments
Confirm delete:
Do you really want to delete benchmark?