truncate() public static method

Truncates string to maximal length.
public static truncate ( $s, $maxLen, $append = "…" ) : string
return string plain text
Beispiel #1
0
 /** @internal */
 protected function checkExtraArgs(MacroNode $node)
 {
     if ($node->tokenizer->isNext()) {
         $args = Latte\Runtime\Filters::truncate($node->tokenizer->joinAll(), 20);
         trigger_error("Unexpected arguments '{$args}' in " . $node->getNotation());
     }
 }