Conversion methods

  1. toLower
  2. toUpper
  3. toAscii

toLower

Returns the lowercase version of the current string.

signature

public function toLower(): self;

usage

use Opis\String\UnicodeString as wstring;

echo wstring::from('ABC')->toLower(); //> abc

toUpper

Returns the uppercase version of the current string.

signature

public function toUpper(): self;

usage

use Opis\String\UnicodeString as wstring;

echo wstring::from('abc')->toUpper(); //> ABC

toAscii

Returns the ASCII version (if possible) of the current string.

signature

public function toAscii(): self;

usage

use Opis\String\UnicodeString as wstring;

echo wstring::from('ăĂâÂîÎşŞţŢ')->toAscii(); //> aAaAiIsStT