← 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

Availability

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

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