strrep()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Replicates a string the number of times specified.

Syntax

strrep(value, multiplier, [ delimiter ])

Learn more about syntax conventions.

Parameters

Name Type Required Description
value string ✔️ The string to replicate.
multiplier int ✔️ The amount of times to replicate the string. Must be a value from 1 to 67108864.
delimiter string The delimeter used to separate the string replications. The default delimiter is an empty string.

Note

If value or delimiter isn't a string, they'll be forcibly converted to string.

Returns

The value string repeated the number of times as specified by multiplier, concatenated with delimiter.

If multiplier is more than the maximal allowed value of 1024, the input string will be repeated 1024 times.

Example

print from_str = strrep('ABC', 2), from_int = strrep(123,3,'.'), from_time = strrep(3s,2,' ')

Output

from_str from_int from_time
ABCABC 123.123.123 00:00:03 00:00:03