码迷,mamicode.com
首页 > 其他好文 > 详细

字符串处理

时间:2017-04-27 13:33:00      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:ascii   binary   har   class   串处理   var_dump   text   from   log   

w

 

http://php.net/manual/en/function.rtrim.php

<?php

$text = "\t\tThese are a few words :) ...  ";
$binary = "\x09Example string\x0A";
$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);

 

字符串处理

标签:ascii   binary   har   class   串处理   var_dump   text   from   log   

原文地址:http://www.cnblogs.com/yuanjiangw/p/6773580.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!