mirror of
https://github.com/samuelncui/yatm.git
synced 2026-01-09 14:43:25 +00:00
15 lines
213 B
Go
15 lines
213 B
Go
package tools
|
|
|
|
func UnpaddingInt8s(buf []int8) string {
|
|
result := make([]byte, 0, len(buf))
|
|
for _, c := range buf {
|
|
if c == 0x00 {
|
|
break
|
|
}
|
|
|
|
result = append(result, byte(c))
|
|
}
|
|
|
|
return string(result)
|
|
}
|