| Recommend this page to a friend! | 
| Classes of jawira | PHP Sanitize Object | docs/Trim.md | Download | 
| 
 | |||||||||||||||||||||
|  Download TrimStrip whitespace (or other characters) from the beginning and end of a string. 
 Parameters<dl> <dt>characters:</dt> <dd>Set of characters you want to remove, default value is "<code> \t\n\r\0\x0B</code>".</dd> <dt>direction:</dt> <dd> Use <code>both</code> to apply trim at the beginning and the end of string, this is the default value.<br> Use <code>left</code> to apply trim at the beginning of string.<br> Use <code>right</code> to apply trim at the end of string. </dd> </dl> ExamplesRemove spaces from the beggining and end of string: Remove spaces at the end of the string: Remove periods, commas and tabulations at the beginning of the string: See also |