API16

API16:JString/ucwords

From Joomla! Documentation

Revision as of 22:48, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== UTF-8 aware alternative to ucwords Uppercase the first character of each word in a string <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Descr...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

UTF-8 aware alternative to ucwords Uppercase the first character of each word in a string

[Edit Descripton]

Template:Description:JString/ucwords

Syntax

static ucwords($str)
Parameter Name Default Value Description
$str

Returns

string with first char of each word uppercase

Defined in

libraries/joomla/utilities/string.php

Importing

jimport( 'joomla.utilities.string' );

Source Body

public static function ucwords($str)
{
        jimport('phputf8.ucwords');
        return utf8_ucwords($str);
}

[Edit See Also] Template:SeeAlso:JString/ucwords

Examples

<CodeExamplesForm />