PHPackages                             lukehayes/str-utils - 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. lukehayes/str-utils

ActiveLibrary

lukehayes/str-utils
===================

String utility helper functions for PHP.

00PHP

Since Apr 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/lukehayes/StrUtils)[ Packagist](https://packagist.org/packages/lukehayes/str-utils)[ RSS](/packages/lukehayes-str-utils/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (2)Used By (0)

StrUtils
========

[](#strutils)

A library of string helpers, to aid a developer.

This is really a small helper project to help with my own needs when I need to alter a string in some way. Rather than trying to remember built in PHP functions, why not make them available in a simple to use API?

### Examples

[](#examples)

First, require the library using:

```
require "vendor/autoload.php";
use LH\StrUtils;
```

then call the static methods:

##### PascalCase

[](#pascalcase)

```
StrUtils::PascalCase("string utils") # returns StringUtils
```

##### CamelCase

[](#camelcase)

```
StrUtils::CamelCase("string utils") # returns stringUtils
```

##### SnakeCase

[](#snakecase)

```
StrUtils::SnakeCase("string utils") # returns string_utils
```

##### Size

[](#size)

```
StrUtils::Size("string utils") # returns 12
```

##### ConvertToInt

[](#converttoint)

```
StrUtils::ConvertToInt("A") # returns 65
```

##### Uglify

[](#uglify)

```
StrUtils::Uglify()
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3280616?v=4)[Luke Hayes](/maintainers/lukehayes)[@lukehayes](https://github.com/lukehayes)

---

Top Contributors

[![lukehayes](https://avatars.githubusercontent.com/u/3280616?v=4)](https://github.com/lukehayes "lukehayes (20 commits)")

### Embed Badge

![Health badge](/badges/lukehayes-str-utils/health.svg)

```
[![Health](https://phpackages.com/badges/lukehayes-str-utils/health.svg)](https://phpackages.com/packages/lukehayes-str-utils)
```

PHPackages © 2026

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