mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
A first prototype for the space of sequences
Former-commit-id: 07dc6ef044b5b6a6fb45dc2acb01dffe71a96195
This commit is contained in:
@ -1,11 +1,17 @@
|
||||
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
|
||||
for i, l := range data {
|
||||
if l >= 'A' && l <= 'Z' {
|
||||
data[i] |= 32
|
||||
}
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user