Str::singular()

static string singular(string $value) Get the singular form of an English word. Parameters string $value Return Value string

Str::replaceLast()

static string replaceLast(string $search, string $replace, string $subject) Replace the last occurrence of a given value in the string. Parameters string $search string $replace string $subject Return Value string

Str::replaceFirst()

static string replaceFirst(string $search, string $replace, string $subject) Replace the first occurrence of a given value in the string. Parameters string $search string $replace string $subject Return Value string

Str::replaceArray()

static string replaceArray(string $search, array $replace, string $subject) Replace a given value in the string sequentially with an array. Parameters string $search array $replace string $subject Return Value string

Str::random()

static string random(int $length = 16) Generate a more truly "random" alpha-numeric string. Parameters int $length Return Value string

Str::quickRandom()

static string quickRandom(int $length = 16) deprecated deprecated since version 5.3. Use the "random" method directly. Generate a "random" alpha-numeric string. Should not be considered sufficient for cryptography, etc. Parameters int $length Return Value string

Str::plural()

static string plural(string $value, int $count = 2) Get the plural form of an English word. Parameters string $value int $count Return Value string

Str::parseCallback()

static array parseCallback(string $callback, string $default) Parse a Class@method style callback into class and method. Parameters string $callback string $default Return Value array

Str::macro()

static void macro(string $name, callable $macro) Register a custom macro. Parameters string $name callable $macro Return Value void

Str::lower()

static string lower(string $value) Convert the given string to lower-case. Parameters string $value Return Value string