https://github.com/krakphp/string
String library
https://github.com/krakphp/string
Last synced: about 1 year ago
JSON representation
String library
- Host: GitHub
- URL: https://github.com/krakphp/string
- Owner: krakphp
- License: mit
- Created: 2017-05-31T16:42:47.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T16:43:37.000Z (about 9 years ago)
- Last Synced: 2025-01-29T06:52:19.356Z (over 1 year ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# String
The string library is just a simple collection of missing php string functions.
## API
// truncate a string and append an optional truncation value
function truncate($str, $len, $end = '')
function map_join($strs, $sep, $predicate)
// hide a substring with a char by replacing each char with the replacement_char
function substr_hide($str, $replacement_char, $start, $length)
Look at the `test/string.php` for examples.