PHPackages                             barouge/strings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. barouge/strings

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

barouge/strings
===============

A library that extends PHP's native string functionality

1.0.0(2y ago)04mitPHPPHP &gt;=8.1

Since Aug 24Pushed 2y agoCompare

[ Source](https://github.com/barogue/strings)[ Packagist](https://packagist.org/packages/barouge/strings)[ RSS](/packages/barouge-strings/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Extensions to PHP native string functionality
=============================================

[](#extensions-to-php-native-string-functionality)

[![Tests](https://github.com/barogue/strings/workflows/quality/badge.svg)](https://github.com/barogue/strings/workflows/quality/badge.svg)[![codecov](https://camo.githubusercontent.com/a64a645b1d64f8dc35362cf3350bcfb5192b79e15d9a9883967b68ec0d0142e5/68747470733a2f2f636f6465636f762e696f2f67682f6261726f6775652f737472696e67732f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/barogue/strings)[![Licence Badge](https://camo.githubusercontent.com/d6ad31d496bb0aa269dea709253ed5d5984dbb50b6fb7cb5ac0981e6d50b1446/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6261726f6775652f737472696e67732e737667)](https://img.shields.io/github/license/barogue/strings.svg)[![Release Badge](https://camo.githubusercontent.com/7fa0048615d76993636aa9ebfef36ee0f901c3d4527cf18d4083366eb0264cb6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6261726f6775652f737472696e67732e737667)](https://img.shields.io/github/release/barogue/strings.svg)[![Tag Badge](https://camo.githubusercontent.com/db3abdf57f14593c402fcd614576a3f349f75946fc98f111adf416b1c77cd3d7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6261726f6775652f737472696e67732e737667)](https://img.shields.io/github/tag/barogue/strings.svg)[![Issues Badge](https://camo.githubusercontent.com/8f184617352ac7e69d8071f90ac957a5ad7b673ebdbf9eeb9b6037ba2564eef4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6261726f6775652f737472696e67732e737667)](https://img.shields.io/github/issues/barogue/strings.svg)[![Code Size](https://camo.githubusercontent.com/3cc6d9c7b6eb01c56f6f885ec3bc21166662ab051da04a67b6f1055f41a501c7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f6261726f6775652f737472696e67732e7376673f6c6162656c3d73697a65)](https://img.shields.io/github/languages/code-size/barogue/strings.svg)

A library that extends PHP's native string functionality

Compatibility and dependencies
------------------------------

[](#compatibility-and-dependencies)

This library is compatible with PHP version `8.2`.

This library has no dependencies.

Installation
------------

[](#installation)

Installation is simple using composer.

```
composer require barogue/strings
```

Or simply add it to your `composer.json` file

```
{
    "require": {
        "barogue/strings": "^1.0"
    }
}
```

Contributing
------------

[](#contributing)

This library follows [PSR-1](https://www.php-fig.org/psr/psr-1/) &amp; [PSR-2](https://www.php-fig.org/psr/psr-2/) standards.

#### Unit Tests

[](#unit-tests)

Before pushing any changes, please ensure the unit tests are all passing.

If possible, feel free to improve coverage in a separate commit.

```
vendor/bin/phpunit --prepend autoload.php
```

#### Code sniffer

[](#code-sniffer)

Before pushing, please ensure you have run the code sniffer. **Only run it using the lowest support PHP version (7.2)**

```
vendor/bin/php-cs-fixer fix
```

#### Static Analyses

[](#static-analyses)

Before pushing, please ensure you have run the static analyses tool.

```
vendor/bin/phan
```

#### Benchmarks

[](#benchmarks)

Before pushing, please ensure you have checked the benchmarks and ensured that your code has not introduced any slowdowns.

Feel free to speed up existing code, in a separate commit.

Feel free to add more benchmarks for greater coverage, in a separate commit.

```
vendor/bin/phpbench run --report=speed
vendor/bin/phpbench run --report=speed --output=markdown
vendor/bin/phpbench run --report=speed --filter=benchNetFromTax --iterations=50 --revs=50000

vendor/bin/phpbench xdebug:profile
vendor/bin/phpbench xdebug:profile --gui
```

Documentation
-------------

[](#documentation)

This library adds a number of array functions to extend PHP's native functionality

Below you can find links to the documentation for the new features.

FunctionDescription[str\_case\_camel](documentation/str_case_camel.md)Converts a string to `camelCase`[str\_case\_kebab](documentation/str_case_kebab.md)Converts a string to `kebab-case`[str\_case\_pascal](documentation/str_case_pascal.md)Converts a string to `PascalCase`[str\_case\_sentence](documentation/str_case_sentence.md)Converts a string to `Sentence case`[str\_case\_snake](documentation/str_case_snake.md)Converts a string to `snake_case`[str\_case\_title](documentation/str_case_title.md)Converts a string to `Title Case`[str\_cipher\_caesar](documentation/str_cipher_caesar.md)Transform a string by shifting each letter up or down the alphabet[str\_cipher\_caesar\_reverse](documentation/str_cipher_caesar_reverse.md)Reverse the effects of `str_cipher_caesar`[str\_cipher\_mono\_alphabetic](documentation/str_cipher_mono_alphabetic.md)Transform a string by mapping each letter to another alphabet[str\_contains](documentation/str_contains.md)Determine if a string contains another string[str\_ends\_with](documentation/str_ends_with.md)Determine if a string ends with another string[str\_random](documentation/str_random.md)Creates a string of random characters[str\_slug](documentation/str_slug.md)Converts a string to a slug[str\_starts\_with](documentation/str_starts_with.md)Determine if a string starts with another string

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

998d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62f4942978644437b5ff3d7bd3f6411580413d327b001104acd4914f43ab63b6?d=identicon)[kusabi](/maintainers/kusabi)

---

Top Contributors

[![kusabi](https://avatars.githubusercontent.com/u/22000941?v=4)](https://github.com/kusabi "kusabi (1 commits)")

---

Tags

phpstringsbarouge

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/barouge-strings/health.svg)

```
[![Health](https://phpackages.com/badges/barouge-strings/health.svg)](https://phpackages.com/packages/barouge-strings)
```

###  Alternatives

[doctrine/inflector

PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.

11.4k855.8M711](/packages/doctrine-inflector)[glowy/strings

Strings Component provide a fluent, object-oriented interface for working with multibyte string, allowing you to chain multiple string operations together using a more readable syntax compared to traditional PHP strings functions.

183.4k2](/packages/glowy-strings)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
