summaryrefslogtreecommitdiffstats
path: root/bridge/helper/helper.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/helper/helper.go')
-rw-r--r--bridge/helper/helper.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/bridge/helper/helper.go b/bridge/helper/helper.go
index ecfc4df2..0b6be4f4 100644
--- a/bridge/helper/helper.go
+++ b/bridge/helper/helper.go
@@ -26,3 +26,15 @@ func DownloadFile(url string) (*[]byte, error) {
resp.Body.Close()
return &data, nil
}
+
+func SplitStringLength(input string, length int) string {
+ a := []rune(input)
+ str := ""
+ for i, r := range a {
+ str = str + string(r)
+ if i > 0 && (i+1)%length == 0 {
+ str += "\n"
+ }
+ }
+ return str
+}