php 字符串的操作

  • trim($str,'特殊字符')-----去除字符串左右两边的字符,返回字符串
  • ltrim(),rtrim()--------------------左,由两边,与trim()类似;
  • addslashes($str)--------------为字符串加入斜线,两侧,返回字符串
  • stripslashes($str)-------------将addslashes()的字符返回原样
  • strlen($str)-----------------------返回长度
  • substrate(string str,int start[,int length)-------------截取从stat开始,长度为length的字符串
  • strcmp(string str1,string str2)------比较字符串大小,区分大小写,返回值1,0,1
  • strcasecmp(string str1,string str2)----比较大小,不区分大小写,返回值1,0,1
  • strnatcmp(string str1,string str2)-------自然排序法,区分大小写
  • strncmp(string str1,string str2,int len)-比较字符串中长度为len的字符
  • strstr(string haystack,string needle)-返回needdle在haystack首次出现的位置到末尾的子字符串
  • str_ireplace(mix search,mix replace,mix subject[,int&count]),用replace替换subject中search,count代表替换次数)
  • substr_replace(string str,string repl,int start,[int length])--用repl代替str中他位置开始长度为count的字符串
  • explode('拆分',str);
  • impode('区分',arr);

最新文章

  1. C++文件读写详解
  2. linux 错误处理
  3. .NET Framework Execution Was Aborted By Escalation Policy
  4. apache 开启服务器包含(SSI)技术
  5. h5拖放-拖拽购物车
  6. 让工程师爱上CMM,实现管理于无形 --- 中标软件CMMI L5之路 (2/2)
  7. zf-关于公司框架的时间字段的格式转换问题。。
  8. volatile的理解和使用
  9. 拨开字符编码的迷雾--MySQL数据库字符编码
  10. mybatis入门篇基——基本配置与参数说明
  11. ruby中__FILE__,$FILENAME,$PROGRAM_NAME,$0等类似变量的含义
  12. TensorFlow.org教程笔记(一)Tensorflow初上手
  13. ad 线束和网络
  14. JAVA基础-输入输出流
  15. 添加php的memcached扩展模块
  16. HUST1017(KB3-A Dancing links)
  17. 004-spring cloud gateway-网关请求处理过程
  18. python服务器端、客户端的模型,客服端发送请求,服务端进行响应(web.py)
  19. java Exception 出错的栈信息打印到日志中 打印堆栈信息
  20. 科普Spark,Spark核心是什么,如何使用Spark(1)

热门文章

  1. OpenStack neutron删除网络设备出错解决办法
  2. leetcode_438_Find All Anagrams in a String_哈希表_java实现
  3. #include <NOIP2009 Junior> 细胞分裂 ——using namespace wxl;
  4. 《TCP/IP 详解 卷一》读书笔记-----Ping&Traceroute
  5. codeforces 712B B. Memory and Trident(水题)
  6. python刷题专用函数。。
  7. Vector3.Dot 判断方位
  8. java9-3 返回类型
  9. Python 栅栏凯撒
  10. C# 使用正则表达式去掉字符串中的数字,或者去掉字符串中的非数字