1 개요[ | ]
- PHP ucwords()
- 문자열에서 각 단어의 첫번째 문자를 대문자로 만든다.
PHP
Copy
echo ucwords('hello, world!');
# Hello, World!
echo ucwords('hello world!');
# Hello World!
PHP
Copy
echo ucwords('HELLO WORLD!');
# HELLO WORLD!
echo ucwords(strtolower('HELLO WORLD!'));
# Hello World!
PHP
Copy
echo ucwords('hello|world!');
# Hello|world!
echo ucwords('hello|world!', "|");
# Hello|World!
2 같이 보기[ | ]
- PHP strtoupper() - 문자열을 대문자로 만든다.
- PHP strtolower() - 문자열을 소문자로 만든다.
- PHP ucfirst() - 문자열의 첫번째 문자를 대문자로 만든다.
- PHP mb_convert_case() - 문자열을 모드에 따라 대소문자를 변경한다.
- PHP studly_case()
- 함수 ucwords()
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.