September 2001
Intermediate to advanced
768 pages
32h 45m
English
string ucwords(string string) Converts the first character of every word in a string to uppercase.
Returns:
String; FALSE on error
Description:
ucwords() converts the first character of every word in a string to uppercase.
The function operates in a fairly simple manner. It loops through each character in a string. When it encounters a whitespace character, it attempts to convert the next character to uppercase. (In most cases, this function considers spaces, horizontal tabs, linefeeds, vertical tabs, formfeeds, and carriage returns to be whitespace—this may depend on the C compiler used.) It also attempts to convert the first character in the string to uppercase.
Note:
This behavior means that ucwords() doesn’t always perform as expected. ...
Read now
Unlock full access