mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-05 09:03:48 +08:00
11 lines
180 B
Go
11 lines
180 B
Go
|
package substring
|
||
|
|
||
|
// reverse is a helper fn for Suffixes
|
||
|
func reverse(b []byte) []byte {
|
||
|
n := len(b)
|
||
|
for i := 0; i < n/2; i++ {
|
||
|
b[i], b[n-1-i] = b[n-1-i], b[i]
|
||
|
}
|
||
|
return b
|
||
|
}
|