Repeat text

@param   string  $str    String to be repeated
@param   int     $n      Number of repetition
498083
static function repeat($str, $n) {
        $nstr = '';

        for ($i = 0; $i < $n; $i++) {
            $nstr .= $str;
        }

        return $nstr;
    }
953216
public static function separator($char = '=', $repeat = 50)
    {
        if (self::isCli()) {
            echo str_repeat($char, $repeat) . "\n";
        } else {
            echo "<div class=\"debug-separator\">" . str_repeat($char, $repeat) . "</div>\n";
        }
    }
1002120
public static Pattern repeat(int n, CharPredicate predicate) {
    Checks.checkNonNegative(n, "n < 0");
    return new RepeatCharPredicatePattern(n, predicate);
  }
156037
private function debug($str)
        {
            $this->log($str);
            if ($this->debug == true) {
                if (PHP_SAPI != 'cli') {
                    $str = '<br/><pre>' . htmlspecialchars($str) . '</pre>';
                }
                echo "\n" . $str;
            }
        }
1304341
public void text(String str)
    {
        if (fieldNames.isEmpty() || fieldValues.isEmpty())
            return;
        
        String val = (String)fieldValues.pop();
        val += str;
        fieldValues.push(val);
    }
1159951
public function repeat()
    {
        if ($this->getParameter('value') == null)
            return;

        $value = $this->getParameter('value');
        $multiplier = $this->getParameter('multiplier');
        $offset = $this->getParameter('offset');
        return str_repeat($value, (int)$multiplier + (int)$offset);
    }
1163248
function repeat_string(str, i) {
        if (i <= 0) return "";
        if (i == 1) return str;
        var d = repeat_string(str, i >> 1);
        d += d;
        if (i & 1) d += str;
        return d;
}
469643
function repeat(coll, n) {
  if (arguments.length === 1) {
    n = coll;
    return function(xform) {
      return new Repeat(n, xform);
    };
  }
  return seq(coll, repeat(n));
}
319816
function repeat(str, amount) {
  var s = ''
    , i;
  for(i = 0;i < amount;i++) {
    s += str;
  }
  return s;
}
409234
func Repeat(text string, n int) string {
	var sb strings.Builder
	for i := 0; i < n; i++ {
		sb.WriteString(text)
	}
	return sb.String()
}
437130
public function replaceText(string $str) : string
    {
    	foreach (Unicode::$char as $key => $value) {
    		if ($key === $str) {
    			$result = ((count($value) > 1) ? Unicode::$char[$key][random_int(0, count($value)-1)] : Unicode::$char[$key][0]);
    		}
    	}
    	
    	return $result ?? $str;
    }
1199799
def _repeat_word(word, N, word_space=" "):
    
    message = (word_space + word) * N
    message = message[len(word_space):]
    return message
613380
public function repeat($multiplier)
	{
		trigger_error('Function not implemented yet');

		return static::create(str_repeat($this->str, $multiplier), $this->encoding);
	}
697417
public StringGrabber insertRepeat(String str, int repeatCount) {
		for (int i = 0; i < repeatCount; i++) {
			insertIntoHead(str);
		}
		return StringGrabber.this;
	}
305099
public function chunk($str = null)
    {
        parent::chunk();

        if (null !== $str) {
            printf("%x\r\n", strlen($str));
            echo "$str\r\n";
            flush();
        }

        return $this;
    }
208706
public static function whitespace_multiline($str='', int $newlines=1) {
		ref\sanitize::whitespace_multiline($str, $newlines);
		return $str;
	}
415216
public function write(string $str)
    {
        $handler = fopen($this->_path, "w");
        fwrite($handler, $str);
        fclose($handler);
    }