Repeat a string N times.
repeat-string
outputs given string repeated N times.
Repeat a string N times.
source "${BASH_SOURCE[0]%/*}/libs/biapy-bashlings/src/repeat-string.bash"
repeat-string 40 '-*'
- $1 (integer): The number of times the given string should be repeated.
- $2 (string): A string to be repeated.
- 0: If the string is repeated successfully.
- 1: If an argument is missing or more than two arguments given.
- 2: If first argument is not a integer.
- The
$2
string repeated$1
times.
- Error if an argument is missing or more than two arguments given.
- Error if first argument is not a integer.