Str::limit()

static string limit(string $value, int $limit = 100, string $end = '...') Limit the number of characters in a string. Parameters string $value int $limit string $end Return Value string

Str::is()

static bool is(string $pattern, string $value) Determine if a given string matches a given pattern. Parameters string $pattern string $value Return Value bool

Str::hasMacro()

static bool hasMacro(string $name) Checks if macro is registered. Parameters string $name Return Value bool

Str::length()

static int length(string $value) Return the length of the given string. Parameters string $value Return Value int

Str::ascii()

static string ascii(string $value) Transliterate a UTF-8 value to ASCII. Parameters string $value Return Value string

Str::endsWith()

static bool endsWith(string $haystack, string|array $needles) Determine if a given string ends with a given substring. Parameters string $haystack string|array $needles Return Value bool

Str::camel()

static string camel(string $value) Convert a value to camel case. Parameters string $value Return Value string

Str::finish()

static string finish(string $value, string $cap) Cap a string with a single instance of a given value. Parameters string $value string $cap Return Value string

Str::contains()

static bool contains(string $haystack, string|array $needles) Determine if a given string contains a given substring. Parameters string $haystack string|array $needles Return Value bool

Str

Str class Str (View source) Traits Macroable