mathiasreker/php-mbstring-extension
Composer 安装命令:
composer require mathiasreker/php-mbstring-extension
包简介
The php-mbstring-extension is a PHP library that provides support for multibyte strings that are not covered by the standard PHP string functions.
README 文档
README
The php-mbstring-extension is a PHP library that provides support
for multibyte strings that are not covered by the standard PHP string
functions.
Versions & Dependencies
| Version | PHP | Documentation |
|---|---|---|
| ^2.0 | ^8.0 | current |
Requirements
PHP>= 8.0- php-extension
ext-mbstring
Installation
To acquire the package, utilize the composer package manager.
composer require mathiasreker/php-mbstring-extension
Documentation
✅ levenshtein
Calculate the Levenshtein distance between two strings.
\MathiasReker\PhpMbFunctions\Mbstring::levenshtein( string $s1, string $s2, int $cost_ins = 1, int $cost_rep = 1, int $cost_del = 1 ): int
✅ ucwords
Uppercase the first character of each word in a string.
\MathiasReker\PhpMbFunctions\Mbstring::ucwords( string $string, string $separators = " \t\r\n\f\v", string $encoding = 'UTF-8' ): string
✅ ucfirst
Make the first character of a string uppercase.
\MathiasReker\PhpMbFunctions\Mbstring::ucfirst( string $string, string $encoding = 'UTF-8' ): string
✅ strrev
Reverse a string.
\MathiasReker\PhpMbFunctions\Mbstring::strrev( string $string, string $encoding = 'UTF-8' ): string
✅ count_chars
Returns information about characters used in a string.
\MathiasReker\PhpMbFunctions\Mbstring::count_chars( string $string, int $mode, string $encoding = 'UTF-8' ): array|string
✅ trim
Multibyte-aware trim function.
\MathiasReker\PhpMbFunctions\Mbstring::trim( string $str, string $charlist = " \t\n\r\0\x0B" ): string
Roadmap
See the open issues for a complete list of proposed features (and known issues).
Contributing
If you have a suggestion to enhance this project, kindly fork the repository and create a pull request. Alternatively, you may open an issue and tag it as "enhancement". Lastly, do not hesitate to give the project a star ⭐. Thank you for your support.
Docker
If you are utilizing Docker, the following command can be used to initiate the process:
docker-compose up -d
Next, access the container:
docker exec -it php-mbstring-extension bash
Tools
PHP Coding Standards Fixer:
composer cs-fix
PHP Coding Standards Checker:
composer cs-check
Rector Fixer:
composer rector-fix
Rector Checker:
composer rector-check
PHP Stan:
composer phpstan
Unit tests:
composer test
License
The distribution of the package operates under the MIT License. Further information can be found in the LICENSE file.
mathiasreker/php-mbstring-extension 适用场景与选型建议
mathiasreker/php-mbstring-extension 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 147 次下载、GitHub Stars 达 6, 最近一次更新时间为 2023 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「mb_str_pad」 「mb_ucfirst」 「mb_ucwords」 「mb_strrev」 「mb_count_chars」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mathiasreker/php-mbstring-extension 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mathiasreker/php-mbstring-extension 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mathiasreker/php-mbstring-extension 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
统计信息
- 总下载量: 147
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-25