to_upper

Convert a string to uppercase

Definition

string to_upper(string $string)

Converts $string to uppercase.

Parameters

string $string

The string to convert to uppercase.

Returns

string

$string with lowercase characters replaced with uppercase.

Examples

{
  a: to_upper('UPPERCASE'),
  b: to_upper('lowercase'),
  c: to_upper('Sentence. Case.'),
  d: to_upper(`3`),
  e: to_upper(`true`),
  f: to_upper(`null`)
}
{
  "a": "UPPERCASE",
  "b": "LOWERCASE",
  "c": "SENTENCE. CASE.",
  "d": null,
  "e": null,
  "f": null
}