Files
obitools4/pkg/obiutils/bytes.go
Eric Coissac 9bf006af93 A first prototype for the space of sequences
Former-commit-id: 07dc6ef044b5b6a6fb45dc2acb01dffe71a96195
2023-08-27 14:58:55 +02:00

18 lines
381 B
Go

package obiutils
// InPlaceToLower converts all uppercase letters in the input byte slice to lowercase in place.
//
// It takes a single parameter:
// - data: a byte slice representing the input data
//
// It returns the modified byte slice.
func InPlaceToLower(data []byte) []byte {
for i, l := range data {
if l >= 'A' && l <= 'Z' {
data[i] |= 32
}
}
return data
}