Reusable User-defined String Functions in JavaScript

Do you ever find yourself in need of a basic string function but just can’t find a built-in function that does the job for you? Do you always end up surfing the web, stackoverflow page after the other, until you form a solid function that does the trick for you 101 years later? Look no further as I’m here to save your life.