diff options
Diffstat (limited to 'lib/str.go')
-rw-r--r-- | lib/str.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 := "" |