diff options
Diffstat (limited to 'lib/str.go')
-rw-r--r-- | lib/str.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/str.go b/lib/str.go new file mode 100644 index 0000000..e0cb8ae --- /dev/null +++ b/lib/str.go @@ -0,0 +1,15 @@ +// Copyright © 2020 rsiddharth <s@ricketyspace.net> +// SPDX-License-Identifier: ISC + +package lib + +func FillStr(a string, l int) string { + b := "" + if l < 1 { + return b + } + for i := 0; i < l; i++ { + b += a + } + return b +} |