Uppercase

Uppercase - Make a string uppercase.

Uppercase only works with string, any other type is ignored.

Basic usage

use Jawira\Sanitizer\Filters as Sanitizer;

class User {
  #[Sanitizer\Uppercase]
  public string $initials;
}

Parameters

No parameters.

Examples

Convert string to lowercase letters.

use Jawira\Sanitizer\Filters as Sanitizer;

class Article {
  #[Sanitizer\Uppercase]
  public string $keywords;
}
"foo" → "FOO"
"Bar Baz" → "BAR BAZ"
"prêt-à-porter" → "PRÊT-À-PORTER"

See also

  • Lowercase - Make a string lowercase.
  • Title - Converts the first letter of each word to uppercase and leaves the others as lowercase.