php man page for ucfirst

Query: ucfirst

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

UCFIRST(3)								 1								UCFIRST(3)

ucfirst - Make a string's first character uppercase

SYNOPSIS
string ucfirst (string $str)
DESCRIPTION
Returns a string with the first character of $str capitalized, if that character is alphabetic. Note that 'alphabetic' is determined by the current locale. For instance, in the default "C" locale characters such as umlaut-a (a) will not be converted.
PARAMETERS
o $str - The input string.
RETURN VALUES
Returns the resulting string.
EXAMPLES
Example #1 ucfirst(3) example <?php $foo = 'hello world!'; $foo = ucfirst($foo); // Hello world! $bar = 'HELLO WORLD!'; $bar = ucfirst($bar); // HELLO WORLD! $bar = ucfirst(strtolower($bar)); // Hello world! ?>
SEE ALSO
lcfirst(3), strtolower(3), strtoupper(3), ucwords(3). PHP Documentation Group UCFIRST(3)
Related Man Pages
get_class(3) - php
mb_strtolower(3) - php
fdf_save_string(3) - php
print(3) - php
ctype_alnum(3) - php
Similar Topics in the Unix Linux Community
SED (or other) upper to lowercase, with first letter of first word in each sentence uppercase
Make all words begin with capital letter?
Shell script to convert words to Title case
Replace the first letter of each line by a capital
Convert text between exact matching patterns to Title case