Ask a question to get started
Enter to send•Shift+Enter new line
TruncateString converts at most the first limit bytes of data to a string,.
func TruncateString(data []byte, limit int) string
TruncateString converts at most the first limit bytes of data to a string, appending "..." if data was longer.
data
[]byte
limit
int