BBCode::Internal_LimitText( $string,  $limit )


Description Description


Source Source

File: includes/admin/parser.php

function Internal_LimitText($string, $limit) {
$chunks = preg_split("/([\\x00-\\x20]+)/", $string, -1, PREG_SPLIT_DELIM_CAPTURE);
$output = "";
foreach ($chunks as $chunk) {
if (strlen($output) + strlen($chunk) > $limit)
break;
$output .= $chunk;
}
$output = rtrim($output);
return $output;
}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.