Skip to main content | Turn off styling Default page style

Question & Answer index

How to get "StartsWith" or "Ends With" using javascript

Useful any time you want to know what the first N characters or last N characters of a string are.

String to parse:

Length of text to grab:

Show me what is on the left

Show me what is on the right