summaryrefslogtreecommitdiffstats
path: root/lib/str.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/str.go')
-rw-r--r--lib/str.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/str.go b/lib/str.go
index e0cb8ae..84f80ab 100644
--- a/lib/str.go
+++ b/lib/str.go
@@ -13,3 +13,18 @@ func FillStr(a string, l int) string {
}
return b
}
+
+// Strip space and newline characters from string.
+func stripSpaceChars(s string) string {
+ ss := ""
+ for i := 0; i < len(s); i++ {
+ if s[i] == ' ' {
+ continue
+ }
+ if s[i] == '\n' {
+ continue
+ }
+ ss += string(s[i])
+ }
+ return ss
+}