krak/string

缺失的 PHP 字符串函数集合

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

This package is auto-updated.

Last update: 2024-09-18 18:29:01 UTC


README

字符串库只是缺失的 PHP 字符串函数的简单集合。

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)

查看 test/string.php 以获取示例。