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

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

shouding/mix-string
===================

When unicode characters and ascii characters mixed, according to your needs, calculate the length of the string

1.0.0(9y ago)014BSDPHP

Since Jun 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/xiangshouding/mix-string)[ Packagist](https://packagist.org/packages/shouding/mix-string)[ RSS](/packages/shouding-mix-string/feed)WikiDiscussions master Synced 2mo ago

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

Shouding\\Mix\\Str
==================

[](#shoudingmixstr)

Description
-----------

[](#description)

When unicode characters and ascii characters mixed, according to your needs, calculate the length of the string

Example
-------

[](#example)

need composer

```
{
    "require": {
        "shouding/mix-string": "1.0.0"
    }
}
```

```
>>> require('vendor/autoload.php')
=> Composer\Autoload\ClassLoader {#162}
>>> use Shouding\Mix\Str;
=> null
>>> Str::length("this is a test 中国")
=> 6
>>> Str::length("this is a test 中国", Str::TYPE_CHAR)
=> 17
>>> Str::length("this is a test 中国", Str::TYPE_BYTES)
=> 21
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

3616d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6187fb849f337554f1515012aedd06d55365e8ac6f170cbadfaaf94d5e3790cd?d=identicon)[xiangshouding](/maintainers/xiangshouding)

---

Top Contributors

[![oxUnd](https://avatars.githubusercontent.com/u/631195?v=4)](https://github.com/oxUnd "oxUnd (7 commits)")

### Embed Badge

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

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

###  Alternatives

[danielstjules/sliceable-stringy

Python string slices in PHP

4751.6k1](/packages/danielstjules-sliceable-stringy)[tcb13/substringy

A sub string manipulation library with multibyte support that extends Stringy

1760.6k1](/packages/tcb13-substringy)

PHPackages © 2026

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