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

Method truncate

lib/Db/ReportMapper.php:480–483  ·  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

478 * @return string
479 */
480 private function truncate($string, $length, $dots = "...")
481 {
482 return (strlen($string) > $length) ? mb_strcut($string, 0, $length - strlen($dots)) . $dots : $string;
483 }
484}

Callers 2

updateMethod · 0.95
updateNameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected