PHP strtoupper() 函数

PHP 教程 · 2019-01-30 12:58:21

实例

把所有字符转换为大写:

<?php
echo strtoupper("Hello WORLD!");
?>

定义和用法

strtoupper() 函数把字符串转换为大写。

注释:该函数是二进制安全的。

相关函数:

  • strtolower() - 把字符串转换为小写
  • lcfirst() - 把字符串中的首字符转换为小写
  • ucfirst() - 把字符串中的首字符转换为大写
  • ucwords() - 把字符串中每个单词的首字符转换为大写

语法


strtoupper(string)


参数 描述
string 必需。规定要转换的字符串。

技术细节

返回值: 返回转换为大写的字符串。
PHP 版本: 4+

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

The  C Programming Language

The C Programming Language

Brian W. Kernighan、Dennis M. Ritchie / Prentice Hall / 1988-4-1 / USD 67.00

Presents a complete guide to ANSI standard C language programming. Written by the developers of C, this new version helps readers keep up with the finalized ANSI standard for C while showing how to ta......一起来看看 《The C Programming Language》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具