mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 15:04:38 +01:00
9 lines
209 B
Go
9 lines
209 B
Go
package bfutil
|
|
|
|
import "bytes"
|
|
|
|
// UpToNull returns the given byte slice's data, up to (not including) the first null byte.
|
|
func UpToNull(data []byte) []byte {
|
|
return bytes.SplitN(data, []byte{0x00}, 2)[0]
|
|
}
|