Home / Search/ Language Reference/ Functions/ Scalar Functions/ String Functions/strrep

strrep

The strrep function repeats given string specified number of times. If first or third argument is not of a string type, it will be forcibly converted to string.

Syntax

    strrep( Value, Multiplier, [ Delimiter ] )

Arguments

  • Value: Input expression.
  • Multiplier: Positive integer value (from 1 to 1024).
  • Delimiter: An optional string expression (default: empty string).

Results

Value repeated for a specified number of times, concatenated with Delimiter.

If Multiplier is more than maximum allowed value (1024), input string will be repeated 1024 times.

Examples

print str1="Hello" | extend newstr=strrep(str1,3)
print str1="Hello" | extend newstr=strrep(str1,3,"-")