string update

This commit is contained in:
stitz
2020-04-18 23:59:22 +02:00
parent 90fe919d65
commit b2edf6bef5

View File

@@ -50,8 +50,8 @@ function endsWith($haystack, $needle) {
return $length === 0 || (substr ( $haystack, - $length ) === $needle);
}
function onlyAlpha($str) {
return preg_replace ( "/[^a-zA-Z0-9 \-\_]+/", "", $str );
function onlyAlpha($str, $zus = '') {
return preg_replace ( "/[^a-zA-Z0-9 \-\{$zus}_]+/", "", $str );
}
function shortener($str, $len = 50, $fill = '...') {
if (strlen ( $str ) > $len) {