liftkit / token
Library for working with string identifiers
Installs: 1 459
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: 4.5.*
This package is auto-updated.
Last update: 2024-12-12 01:37:05 UTC
README
A library for working with string identifiers.
Capitalized
use LiftKit\Token\Token; $token = new Token('some string'); echo $token->capitalized(); // Some String
Uppercase
$token = new Token('some string'); echo $token->uppercase(); // SOME STRING
Lowercase
$token = new Token('SOme stRing'); echo $token->lowercase(); // some string
Camelcase
$token = new Token('some string'); echo $token->camelcase(); // someString
Join
$token = new Token('some string with words'); echo $token->join('$'); // some$string$with$words
Dashed
$token = new Token('some string with words'); echo $token->dashed(); // some-string-with-words
Underscored
$token = new Token('some string with words'); echo $token->underscored(); // some_string_with_words
Combination
$token = new Token('some string with words'); echo $token->uppercase()->underscored(); // SOME_STRING_WITH_WORDS