Go Daily Tips
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")
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment