mirror of https://github.com/gofiber/fiber.git
28 lines
645 B
Go
28 lines
645 B
Go
// ⚡️ Fiber is an Express inspired web framework written in Go with ☕️
|
|
// 🤖 Github Repository: https://github.com/gofiber/fiber
|
|
// 📌 API Documentation: https://docs.gofiber.io
|
|
|
|
package utils
|
|
|
|
// ToLower converts ascii string to lower-case
|
|
func ToLower(b string) string {
|
|
res := make([]byte, len(b))
|
|
copy(res, b)
|
|
for i := 0; i < len(res); i++ {
|
|
res[i] = toLowerTable[res[i]]
|
|
}
|
|
|
|
return UnsafeString(res)
|
|
}
|
|
|
|
// ToUpper converts ascii string to upper-case
|
|
func ToUpper(b string) string {
|
|
res := make([]byte, len(b))
|
|
copy(res, b)
|
|
for i := 0; i < len(res); i++ {
|
|
res[i] = toUpperTable[res[i]]
|
|
}
|
|
|
|
return UnsafeString(res)
|
|
}
|