summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-09-05 18:51:19 -0400
committerrsiddharth <s@ricketyspace.net>2020-09-05 18:51:19 -0400
commit84cabad5fcf2224197526301ff82c08018eae7f5 (patch)
tree5df21ccb48064423d91273b997d1cade612c6fa9
parente57a76620a5de1f627a50ab63635f6f1cae39c8c (diff)
lib: move around stripSpaceChars
* lib/b64.go (stripSpaceChars): Move to... * lib/str.go (stripSpaceChars): ...here.
-rw-r--r--lib/b64.go15
-rw-r--r--lib/str.go15
2 files changed, 15 insertions, 15 deletions
diff --git a/lib/b64.go b/lib/b64.go
index f566b14..f8a8de8 100644
--- a/lib/b64.go
+++ b/lib/b64.go
@@ -64,18 +64,3 @@ func index(c byte) uint32 {
}
return uint32(0)
}
-
-// 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
-}
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
+}