krak / string
A collection of missing php string functions
v0.2.0
2016-04-27 22:55 UTC
Requires
- php: >=5.2
Requires (Dev)
- peridot-php/peridot: ^1.18
This package is auto-updated.
Last update: 2024-12-18 19:04:28 UTC
README
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.