zoukankan
html css js c++ java
PHP chop() 函数
实例
移除字符串右侧的字符:
<?php
$str = "Hello World!";
高佣联盟
www.cgewang.com
echo $str . "<br>";
echo chop($str,"World!");
?>
定义和用法
chop() 函数移除字符串右侧的空白字符或其他预定义字符。
语法
chop(
string,charlist
)
参数
描述
string
必需。规定要检查的字符串。
charlist
可选。规定从字符串中删除哪些字符。
如果 charlist 参数为空,则移除下列字符:
" " - NULL
" " - 制表符
" " - 换行
"x0B" - 垂直制表符
" " - 回车
" " - 空格
技术细节
返回值:
返回已修改的字符串。
PHP 版本:
4+
更新日志:
在 PHP 4.1.0 中,新增了
charlist
参数。
查看全文
相关阅读:
用css3弹性盒子模型实现九宫格布局
css布局之左中右结构总结
内联块inline-block的垂直间隙问题
Jquery选择器 讲解
U大师装系统
陈伟:软件趋势——云物移大智
asp网站发布步骤总结
MYfirst
ASP.net 利用From实现上传文件
【ASP.NET Core CentOS 发布】(四)在CentOS上安装.NET Core运行时、部署到CentOS
原文地址:https://www.cnblogs.com/yc10086/p/13112168.html
最新文章
jQuery获取浏览器滚动条距离顶端的距离
让透明div里的文字不透明
CSS3技巧:fit-content水平居中
CSS3:linear-gradient切角画册
css3技巧——产品列表之鼠标滑过效果translateY(三)
巧用CSS3的calc()宽度计算做响应模式布局
css实现单行,多行文本溢出显示(...)
javascript面向对象编程
promise第一篇-简介
ubuntu14安装node0.12.7
热门文章
JS基本包装类型之三(String)
bind&currying
css position
JS中的数据类型和变量内存
JS事件处理程序
JS解析url
python中的__metaclass__
css中百分比的计算基准归纳
用最少的html标签实现图片上传进度展示
bootstrap的三角方向符号实现
Copyright © 2011-2022 走看看