Piwik\Plugins\CoreVisualizations\Visualizations\Cloud::truncateWordIfNeeded PHP Method

truncateWordIfNeeded() private method

private truncateWordIfNeeded ( $word ) : string
$word
return string
    private function truncateWordIfNeeded($word)
    {
        $word = Common::unsanitizeInputValue($word);
        if (Common::mb_strlen($word) > $this->truncatingLimit) {
            return Common::mb_substr($word, 0, $this->truncatingLimit - 3) . '...';
        }
        return $word;
    }