Parse
  • Get started
    • Parser utilities for PHP
  • Request
    • HTTP Request input parser
    • Request SERVER vars
    • Request URL vars
    • Request GLOBAL vars
  • Route
    • Dispatch
  • Str
    • String parser
    • Initialise String
    • Case manipulators
    • Content slimmers
  • Dump
    • Output formatter
Powered by GitBook
On this page
  • upper()
  • lower()
  • capitalize()
  • title()
  • camel()
  • snake()
  • kebab()
  • pascal()
  1. Str

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
PreviousInitialise StringNextContent slimmers

Last updated 2 years ago