Truncate
class Truncate extends StringMutator (View source)
Truncate a string to a given length. Appends the provided ellipsis to the end of the string if it is truncated.
Traits
Methods
__construct(int $length, string $ellipsis = '...')
No description
string
mutateString(string $value)
No description
Details
__construct(int $length, string $ellipsis = '...')
No description
static Truncate
make(int $length, string $ellipsis = '...')
No description
final mixed
mutate(mixed $value)
Mutate the input value.
protected string
mutateString(string $value)
No description
protected string
resolveStringInput(mixed $value)
No description