Oihana PHP

capitalize.php

Table of Contents

Functions

capitalize()  : string
Capitalizes a string: uppercases the first character and lowercases the rest (multibyte-safe).

Functions

capitalize()

Capitalizes a string: uppercases the first character and lowercases the rest (multibyte-safe).

capitalize(string $source) : string
Parameters
$source : string

The input string.

Tags
example
use function oihana\core\strings\capitalize;

echo capitalize( 'hELLO' )       ; // "Hello"
echo capitalize( 'hello world' ) ; // "Hello world"
echo capitalize( 'ÉLAN' )        ; // "Élan"
author

Marc Alcaraz (ekameleon)

since
1.0.9
Return values
string

The capitalized string.

On this page

Search results