1
0
Fork 0
This repository has been archived on 2025-07-27. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
bareos-zabbix-check/pkg/utils/clen.go

11 lines
190 B
Go

package utils
// Clen returns the length of a null terminated string like in C
func Clen(n []byte) int {
for i := 0; i < len(n); i++ {
if n[i] == 0 {
return i
}
}
return len(n)
}