You are here

public function SassString::op_times in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/script/literals/SassString.php \SassString::op_times()

String multiplication. this is repeated other times

Parameters

sassNumber the number of times to repeat this:

Return value

sassString the string result

Overrides SassLiteral::op_times

File

phpsass/script/literals/SassString.php, line 69

Class

SassString
SassString class. Provides operations and type testing for Sass strings. @package PHamlP @subpackage Sass.script.literals

Code

public function op_times($other) {
  if (!$other instanceof SassNumber || !$other
    ->isUnitless()) {
    throw new SassStringException('Value must be a unitless number', SassScriptParser::$context->node);
  }
  $this->value = str_repeat($this->value, $other->value);
  return $this;
}