PHPackages                             bobzhai/pinyin - 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. bobzhai/pinyin

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

bobzhai/pinyin
==============

Trunclale Chiness word ufword

00PHP

Since Dec 9Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (1)Used By (0)

Translate Chineses Word Ucword
==============================

[](#translate-chineses-word-ucword)

PHP library for interacting with CBSMS

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

[](#installation)

```
$ composer require bobzhai/pinyin
```

Or add to `composer.json`:

```
"require": {
    "bobzhai/pinyin": "dev-master"
}
```

then run `composer update`.

### single use

[](#single-use)

```
require_once "./vendor/autoload.php";

use Bobzhai\Pinyin\Pinyin;
$input_str,$upper=true,$shift_word=false

/* ---  ucwords -------------------------
* `@input_str` - it's string
* `@upper` - output uppercase true/false
* `@shift_word` - remove not no character true/false
*/
$code = Pinyin::ucwords('测试',true,false);

echo $code   //  CS
```

License
-------

[](#license)

Copyright 2022, Bobzhai. Licensed under the MIT license:

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

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://www.gravatar.com/avatar/aab175b4e20373db589cbdef8cb330535cceff30b4b6fa1dc2d07213807b00fc?d=identicon)[azhai2016](/maintainers/azhai2016)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/bobzhai-pinyin/health.svg)

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

PHPackages © 2026

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