Conversion methods

Conversion methods

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
On this page