Query: ucwords
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
UCWORDS(3) 1 UCWORDS(3) ucwords - Uppercase the first character of each word in a stringSYNOPSISstring ucwords (string $str)DESCRIPTIONReturns a string with the first character of each word in $str capitalized, if that character is alphabetic. The definition of a word is any string of characters that is immediately after a whitespace (These are: space, form-feed, newline, car- riage return, horizontal tab, and vertical tab).PARAMETERSo $str - The input string.RETURN VALUESReturns the modified string.EXAMPLESExample #1 ucwords(3) example <?php $foo = 'hello world!'; $foo = ucwords($foo); // Hello World! $bar = 'HELLO WORLD!'; $bar = ucwords($bar); // HELLO WORLD! $bar = ucwords(strtolower($bar)); // Hello World! ?>NOTESNote This function is binary-safe.SEE ALSOstrtoupper(3), strtolower(3), ucfirst(3), mb_convert_case(3). PHP Documentation Group UCWORDS(3)
| Related Man Pages |
|---|
| runkit_method_rename(3) - php |
| fdf_save_string(3) - php |
| print(3) - php |
| mb_strtoupper(3) - php |
| rtrim(3) - php |
| Similar Topics in the Unix Linux Community |
|---|
| perl newbie: how to extract an unknown word from a string |
| Print a horizontal word vertically. |
| Hello World! |
| Simple negated test condition |
| sed command to replace consecutive double quotes |