bacon/bacon-string-utils
Composer 安装命令:
composer require bacon/bacon-string-utils
包简介
BaconStringUtils contain utitilies to work with strings.
README 文档
README
Introduction
BaconStringUtils contain utitilies to work with strings. The currently included components are:
-
BaconStringUtils\Slugifier URI-friendly slug generator.
You sometimes need to display a text value in a URI, like for instance the title of an article in a blog URL, like those generated by wordpress. This component helps you to generate such a usable slug. It interally makes use of the BaconStringUtils\UniDecoder component also provided by this library.
-
BaconStringUtils\UniDecoder US-ASCII transliterations of Unicode text.
It often happens that you have non-Roman text data in Unicode, but you can't display it -- usually because you're trying to show it to a user via an application that doesn't support Unicode, or because the fonts you need aren't accessible. You could represent the Unicode characters as "???????" or " BA A0q0...", but that's nearly useless to the user who actually wants to read what the text says.
What this component provides is a method, 'decode(...)' that takes Unicode data and tries to represent it in ASCII characters (i.e., the universally displayable characters between 0x00 and 0x7F). The representation is almost always an attempt at transliteration -- i.e., conveying, in Roman letters, the pronunciation expressed by the text in some other writing system.
For example "$decoder->decode('北亰')" returns "Bei Jing".
This is a PHP port of the UniDecode Python module, which on the other hand is a port of the Text::Unidecode Perl module by Sean M. Burke sburke@cpan.org.
bacon/bacon-string-utils 适用场景与选型建议
bacon/bacon-string-utils 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 652.82k 次下载、GitHub Stars 达 27, 最近一次更新时间为 2013 年 03 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bacon/bacon-string-utils 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bacon/bacon-string-utils 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 652.82k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 27
- 点击次数: 13
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2013-03-12