You are here

function truncate_text in TinyBrowser 7

File

tinybrowser/fns_tinybrowser.php, line 273

Code

function truncate_text($textstring, $length) {
  if (strlen($textstring) > $length) {
    $textstring = substr($textstring, 0, $length) . '...';
  }
  return $textstring;
}