Trim
(PHP 3, PHP 4 >= 4.0.0) Trim--Removes a blank description of the beginning and end of a string
String Trim (String str [, String charlist])
Note: The second parameter is used in PHP 4.1.0
This function returns the new string after which the STR string is stripped. Trim () without the second parameter strips the following characters:
"" (ASCII (0x20)), space;
"" (ASCII 9 (0x09)), tab;
"" (ASCII (0x0A)), line break;
"" (ASCII (0x0D)), carriage return;
"" (ASCII 0 (0x00)), null character;
"x0b" (ASCII One (0x0B)), Vertical tab.
You can specify the characters you want to remove by using the charlist parameter. Simply list all characters so want to be stripped. With.. You can specify a range of characters.
Example 1. Trim () example
See website Building server script class \phpphp user manual Fancyfunction.ltrim.html>ltrim () and RTrim ().
http://www.bkjia.com/PHPjc/532349.html www.bkjia.com true http://www.bkjia.com/PHPjc/532349.html techarticle Trim (PHP 3, PHP 4 >= 4.0.0) Trim--Removes a string that begins and ends with a blank description of string trim (String str [, String charlist]) Note: The second parameter is used in PHP 4 .1.0 This letter ...