jstewmc/expand-abbreviations
Composer 安装命令:
composer require jstewmc/expand-abbreviations
包简介
Expand abbreviations
README 文档
README
A service to expand abbreviations:
namespace Jstewmc\ExpandAbbreviations; // define replacements (i.e., replace "foo" with "bar") $replacements = ['foo' => 'bar']; // instantiate service $service = new ExpandAbbreviations($replacements); // expand abbreviations $service('foo bar baz'); // returns "bar bar baz" $service('foo. bar baz'); // returns "bar bar baz" $service('qux'); // returns "qux"
Given an array of replacements indexed by abbreviation, this library will expand all occurences of an abbreviation in a string to its corresponding replacement.
Keep in mind, this library is case-sensitive but trailing-period agnostic.
Author
Version
0.1.0, May 29, 2017
- Initial release
License
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-09