mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
18 lines
381 B
Go
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
|
|
}
|