File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,20 +8,20 @@ import (
88 casebytes "github.com/gofiber/utils/v2/bytes"
99)
1010
11- // ToLowerBytes converts an ASCII byte slice to lower-case without modifying the input .
11+ // ToLowerBytes converts an ASCII byte slice to lower-case in-place .
1212//
13- // Deprecated: use package "github.com/gofiber/utils/v2/bytes" and call bytes.ToLower .
14- // This wrapper keeps backward compatibility by applying in-place conversion on a copied slice.
13+ // Deprecated: use package "github.com/gofiber/utils/v2/bytes" and call bytes.UnsafeToLower .
14+ // This wrapper keeps backward compatibility by mutating the provided slice.
1515func ToLowerBytes (b []byte ) []byte {
16- return casebytes .ToLower (b )
16+ return casebytes .UnsafeToLower (b )
1717}
1818
19- // ToUpperBytes converts an ASCII byte slice to upper-case without modifying the input .
19+ // ToUpperBytes converts an ASCII byte slice to upper-case in-place .
2020//
21- // Deprecated: use package "github.com/gofiber/utils/v2/bytes" and call bytes.ToUpper .
22- // This wrapper keeps backward compatibility by applying in-place conversion on a copied slice.
21+ // Deprecated: use package "github.com/gofiber/utils/v2/bytes" and call bytes.UnsafeToUpper .
22+ // This wrapper keeps backward compatibility by mutating the provided slice.
2323func ToUpperBytes (b []byte ) []byte {
24- return casebytes .ToUpper (b )
24+ return casebytes .UnsafeToUpper (b )
2525}
2626
2727// AddTrailingSlashBytes appends a trailing '/' to b if it does not already end with one.
You can’t perform that action at this time.
0 commit comments