in: 后端程序
首字母变大写:ucwords()

<?php
$foo = 'hello world!';
$foo = ucwords($foo); // Hello World!
$bar = 'HELLO WORLD!';
$bar = ucwords($bar); // HELLO WORLD!
$bar = ucwords(strtolower($bar)); // Hello World!
?>

第一个词首字母变大写:ucfirst()

<?php
$foo = 'hello world!';
$foo = ucfirst($foo); // Hello world!
$bar = 'HELLO WORLD!';
$bar = ucfirst($bar); // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>

第一个词首字母小写lcfirst()

<?php
//by www.jbxue.com
$foo = 'HelloWorld';
$foo = lcfirst($foo); // helloWorld

$bar = 'HELLO WORLD!';
$bar = lcfirst($bar); // hELLO WORLD!
$bar = lcfirst(strtoupper($bar)); // hELLO WORLD!
?>

字母变大写:strtoupper()

字母变小写:strtolower()

最新文章

  1. webApi上传下载文件
  2. 程序员能力矩阵 Programmer Competency Matrix
  3. 自定义View之onMeasure()
  4. HTML5系列五(Canvas详述)
  5. APP测试流程
  6. USACO section1.2 Miking cows
  7. sql2008“备份集中的数据库备份与现有数据库不同”解决方法
  8. cenos6.5 64位下PHP远程连接sql server2008成功案例
  9. video.js不能控制本地视频或者音频播放时长
  10. 剑指架构师系列-持续集成之Maven+Nexus+Jenkins+git+Spring boot
  11. 记录一次Orthanc dicom数据异常手动修复
  12. 网站发布出现“未能找到路径“path\bin\roslyn\csc.exe”....“和拒绝访问的解决办法
  13. 拯救老旧工程,记桥接SpringMVC与Stripes框架
  14. R语言模块安装
  15. Redis 深度历险
  16. 【Python】socket编程-3
  17. python第三十五课——生成器
  18. python 3.x 用户登录重设密码
  19. 第11月第23天 markedTextRange 崩溃
  20. shell中调用R语言并传入参数的两种步骤

热门文章

  1. javascript 模式方面的学习
  2. [LeetCode]题解(python):103 Binary Tree Zigzag Level Order Traversal
  3. [LeetCode]题解(python):094 Binary Tree Inorder Traversal
  4. vb 修改数据库
  5. Swift-06-闭包
  6. iOS GCD简单使用
  7. iOS苹果开发者客服电话地址
  8. dede完美分页样式
  9. 第一段nodejs代码
  10. ISymbol