Go Daily Tips
Showing posts with label
string
.
Show all posts
Showing posts with label
string
.
Show all posts
Sunday, January 4, 2015
Trim strings
- To remove final nulls from strings coming from a buffer:
strings.TrimRight(myStringFromABuffer, "\x00")
- To remove new lines from string:
strings.Trim(myString, "\r\n")
Older Posts
Home
Subscribe to:
Posts (Atom)