Case manipulators
upper()
Convert a string to uppercase.
Str::set('hello darling Nicky')->upper(); // HELLO DARLING NICKY
lower()
Convert a string to lowercase.
Str::set('hello darling Nicky')->lower(); // hello darling nicky
capitalize()
Capitalise a string.
Str::set('hello darling Nicky')->capitalize(); // Hello darling Nicky
title()
Convert a string to titlecase.
Str::set('hello darling Nicky')->title(); // Hello Darling Nicky
camel()
Convert a string to camelcase.
Str::set('hello darling Nicky')->camel(); // helloDarlingNicky
snake()
Convert a string to snake_case.
Str::set('hello darling Nicky')->camel(); // hello_darling_nicky
kebab()
Convert a string to kebab-case.
Str::set('hello darling Nicky')->kebab(); // hello-darling-nicky
pascal()
Convert a string to pascalcase.
Str::set('hello darling Nicky')->pascal(); // HelloDarlingNicky
Last updated