PHPackages                             krak/string - 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. krak/string

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

krak/string
===========

A collection of missing php string functions

v0.2.0(10y ago)0728MITPHPPHP &gt;=5.2

Since Aug 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/krakphp/string)[ Packagist](https://packagist.org/packages/krak/string)[ Docs](http://gitlab.bighead.net/krak/string)[ RSS](/packages/krak-string/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

String
======

[](#string)

The string library is just a simple collection of missing php string functions.

API
---

[](#api)

```
// truncate a string and append an optional truncation value
function truncate($str, $len, $end = '')
function map_join($strs, $sep, $predicate)
// hide a substring with a char by replacing each char with the replacement_char
function substr_hide($str, $replacement_char, $start, $length)

```

Look at the `test/string.php` for examples.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~266 days

Total

2

Last Release

3673d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6f21acab19d85e04f8ce3ff759743f9438810ab7771d7ddf96d167fa9f86220?d=identicon)[ragboyjr](/maintainers/ragboyjr)

---

Top Contributors

[![ragboyjr](https://avatars.githubusercontent.com/u/1975857?v=4)](https://github.com/ragboyjr "ragboyjr (3 commits)")

---

Tags

phpstringmisc

### Embed Badge

![Health badge](/badges/krak-string/health.svg)

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

###  Alternatives

[coduo/php-to-string

Simple library that converts PHP value into strings

27112.7M10](/packages/coduo-php-to-string)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)

PHPackages © 2026

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