krak/string

A collection of missing php string functions

v0.2.0 2016-04-27 22:55 UTC

This package is auto-updated.

Last update: 2024-04-18 17:34:29 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.