Unix and Linux Discussions Tagged with bar |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
4,988 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
1,821 |
Shell Programming and Scripting |
|
|
|
1 |
1,182 |
What is on Your Mind? |
|
|
|
3 |
5,195 |
Shell Programming and Scripting |
|
|
|
0 |
4,877 |
Programming |
|
|
|
0 |
3,588 |
Windows & DOS: Issues & Discussions |
|
|
|
2 |
7,063 |
Shell Programming and Scripting |
|
|
|
0 |
1,208 |
UNIX and Linux RSS News |
|
|
|
0 |
2,094 |
OS X Support RSS |
|
|
|
0 |
762 |
Software Releases - RSS News |
|
|
|
0 |
781 |
Software Releases - RSS News |
|
|
|
0 |
1,324 |
UNIX and Linux RSS News |
|
|
|
1 |
4,215 |
Shell Programming and Scripting |
|
|
|
0 |
1,074 |
Software Releases - RSS News |
|
|
|
0 |
1,355 |
UNIX and Linux RSS News |
|
|
|
1 |
15,539 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
925 |
UNIX and Linux RSS News |
|
|
|
0 |
656 |
Software Releases - RSS News |
|
|
|
0 |
1,952 |
UNIX and Linux RSS News |
|
|
|
1 |
4,288 |
Linux |
|
|
|
0 |
848 |
Software Releases - RSS News |
|
|
|
3 |
5,382 |
Shell Programming and Scripting |
|
|
|
5 |
2,863 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,145 |
UNIX for Advanced & Expert Users |
|
|
|
5 |
2,994 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,900 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
15,058 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
6,034 |
UNIX for Dummies Questions & Answers |
UCWORDS(3) 1 UCWORDS(3)
ucwords - Uppercase the first character of each word in a string
SYNOPSIS
string ucwords (string $str)
DESCRIPTION
Returns 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).
PARAMETERS
o $str
- The input string.
RETURN VALUES
Returns the modified string.
EXAMPLES
Example #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!
?>
NOTES
Note
This function is binary-safe.
SEE ALSO
strtoupper(3), strtolower(3), ucfirst(3), mb_convert_case(3).
PHP Documentation Group UCWORDS(3)