MCPcopy Create free account
hub / github.com/Rello/analytics / truncate

Method truncate

lib/Db/ReportMapper.php:476–479  ·  view source on GitHub ↗

* truncates fiels do DB-field size * * @param $string * @param $length * @param $dots * @return string */

($string, $length, $dots = "...")

Source from the content-addressed store, hash-verified

474 * @return string
475 */
476 private function truncate($string, $length, $dots = "...")
477 {
478 return (strlen($string) > $length) ? mb_strcut($string, 0, $length - strlen($dots)) . $dots : $string;
479 }
480}

Callers 2

updateMethod · 0.95
updateNameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected