← All docs

ucwords()

Uppercases the first character of each word in a string.

ucwords()

function ucwords(string $string, string $separators = ' \t\r\n\x0c\x0b'): string

Uppercases the first character of each word in a string.

Parameters:

  • $string (string)
  • $separators (string), default ' \t\r\n\x0c\x0b', optional

Returns: string

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how ucwords is implemented in the compiler, see the internals page.