library expand-abbreviations
Expand abbreviations
jstewmc/expand-abbreviations
Expand abbreviations
- Tuesday, May 30, 2017
- by Jstewmc
- Repository
- 1 Watchers
- 0 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 17 % Grown
expand-abbreviations
A service to expand abbreviations:, (*1)
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., (*2)
Keep in mind, this library is case-sensitive but trailing-period agnostic., (*3)
Author
Jack Clayton, (*4)
Version
0.1.0, May 29, 2017
License
MIT, (*5)
dev-master
9999999-dev
Expand abbreviations
Sources
Download
MIT
The Requires
The Development Requires
by
Jack Clayton
php
jstewmc
abbreviations
expand
v1.0.0
1.0.0.0
Expand abbreviations
Sources
Download
MIT
The Requires
The Development Requires
by
Jack Clayton
php
jstewmc
abbreviations
expand