Signature: repeat(s: string, n: int) -> Result<string, StringError>

Description: Concatenates s with itself n times. Error(InvalidArgument) on negative n.

Parameters

Returns: Result<string, StringError>

Example

repeat("ab", 3)  // Success { value: "ababab" }