string function's tag archives

Javascript Equivalent of PHP’s trim function

Trim function in PHP can remove whitespace from the beginning and end of a string. Javascript do not have this function, but is easy to made one.

How to Find and Replace Text in MySQL Database using SQL

MySQL database has a handy and simple string function REPLACE() that allows table data with the matching string (from_string) to be replaced by new string (to_string). This is useful if there is need to search and replace a text string which affects many records or rows, such as change of company name, postcode, URL or spelling mistake. The syntax of REPLACE is REPLACE(text_string, from_string, to_string) MySQL reference describes REPLACE as function that returns the string text_string wit...