trim(卡塔尔(قطر‎trim(卡塔尔函数用来整治客户输入数据

1.字符串的股盘的整理:chop(卡塔尔,itrim(State of Qatar,trim(卡塔尔国trim(卡塔尔(قطر‎函数用来照望顾客输入数据,如下展现:$name=trim($name卡塔尔国;$email=trim($email卡塔尔国;tirm(State of Qatar函数能够去除字符串初阶地方和结束地方的空格,并将结果字符串重临。暗中同意情状下来除换行符回车符(rState of Qatar水平(t卡塔尔(قطر‎和垂直制表符(x0B卡塔尔(قطر‎字符串甘休符号(卡塔尔和空格。以下是根源于手册Without the second parameter,
rtrim(卡塔尔国 will strip these characters: * (ASCII 32 (0x20)), an ordinary
space. * t (ASCII 9 (0x09)), a tab. * n (ASCII 10 (0x0A)), a new line
(line feed). * r (ASCII 13 (0x0D)), a carriage return. * (ASCII 0
(0x00)), the NUL-byte. * x0B (ASCII 11 (0x0B)), a vertical
tabExample#1 Usage example of rtrim()?php$text = ttThese are a few
words 🙂 … ;$binary = x09Example stringx0A;$hello = Hello
World;var_dump($text, $binary, $hello);print n;$trimmed =
rtrim($text);var_dump($trimmed);$trimmed = rtrim($text,
t.);var_dump($trimmed);$trimmed = rtrim($hello,
Hdle);var_dump($trimmed);// trim the ASCII control characters at the
end of $binary// (from 0 to 31 inclusive)$clean = rtrim($binary,
x00..x1F);var_dump($clean卡塔尔(قطر‎;?上例将出口:string(32State of Qatar These are a few
words :卡塔尔国 … string(16卡塔尔 Example stringstring(11卡塔尔国 Hello Worldstring(30State of QatarThese are a few words :卡塔尔 …string(26卡塔尔(قطر‎ These are a few words :卡塔尔(قطر‎string(9)Hello Worstring(15卡塔尔(قطر‎ Example string函数explode(卡塔尔(قطر‎ implode(卡塔尔国 join(卡塔尔国explode
使用一个字符串分割另二个字符串字符串的排序 strcmp(State of Qatar strcasecmp(State of Qatarstrnatcmp(卡塔尔国在字符串中探寻字符串 strstr(State of Qatar strchr(State of Qatar strrchr(卡塔尔国stristr(卡塔尔太多了,慢慢看手册<

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*
*
Website