FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Check for a substring
Perform a case-sensitive JavaScript substring check.
JavaScript✓ Tested
Pad a numeric label
Convert a number to text and pad it to a fixed width.
JavaScript✓ Tested
Replace all literal matches
Replace repeated substrings with JavaScript replaceAll.
JavaScript✓ Tested
Split and trim text
Split simple comma-separated JavaScript text and trim each part.
JavaScript✓ Tested
Trim surrounding whitespace
Remove leading and trailing JavaScript string whitespace.
JavaScript✓ Tested