Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

palmtreephp/string

Repository files navigation

🌴 Palmtree String

License Build Packagist Version

Object-oriented string manipulation library

Requirements

  • PHP >= 8.1

Installation

Use composer to add the package to your dependencies:

composer require palmtree/string

Usage

use function Palmtree\String\s;
$str = s('foo bar baz');
$str->startsWith('foo'); // true
$str->endsWith('baz'); // true
$str->contains('bar'); // true
$str->replace('bar', 'qux'); // 'foo qux baz'
$str->after('bar'); // ' baz'
$str->afterLast('b'); // 'az'
$str->beforeFirst('b'); // 'foo '
$str->kebab(); // 'foo-bar-baz'
$str->camel(); // 'fooBarBaz'
$str->snake(); // 'foo_bar_baz'

Many other methods are provided. Read through the documented source code to see more.

License

Released under the MIT license

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /