&$arg) { if ($ignoreEmpty === true && is_string($arg) && trim($arg) === '') { unset($aArgs[$key]); } elseif (is_bool($arg)) { $arg = Helpers::convertBooleanValue($arg); } } return implode($delimiter, $aArgs); } /** * REPT. * * Returns the result of builtin function round after validating args. * * @param mixed $stringValue The value to repeat * @param mixed $repeatCount The number of times the string value should be repeated */ public static function builtinREPT($stringValue, $repeatCount): string { $repeatCount = Functions::flattenSingleValue($repeatCount); $stringValue = Helpers::extractString($stringValue); if (!is_numeric($repeatCount) || $repeatCount < 0) { return Functions::VALUE(); } return str_repeat($stringValue, (int) $repeatCount); } }