summaryrefslogtreecommitdiffstats
path: root/lib/str.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/str.go')
-rw-r--r--lib/str.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/str.go b/lib/str.go
index c71762c..0191806 100644
--- a/lib/str.go
+++ b/lib/str.go
@@ -33,6 +33,14 @@ func StrToBytes(s string) []byte {
return bs
}
+func BytesToStr(bs []byte) string {
+ s := ""
+ for i := 0; i < len(bs); i++ {
+ s += string(bs[i])
+ }
+ return s
+}
+
// Strip space and newline characters from string.
func stripSpaceChars(s string) string {
ss := ""