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

Method truncate

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

485 * @return string
486 */
487 private function truncate($string, $length, $dots = "...")
488 {
489 return (strlen($string) > $length) ? mb_strcut($string, 0, $length - strlen($dots)) . $dots : $string;
490 }
491}

Callers 2

updateMethod · 0.95
updateNameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected