BBCode::Internal_LimitText( $string, $limit )
Description
Source
File: bp-forums/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;
}
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.