// ⚡️ 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

// ToLowerBytes converts ascii slice to lower-case in-place.
func ( []byte) []byte {
	for  := 0;  < len(); ++ {
		[] = toLowerTable[[]]
	}
	return 
}

// ToUpperBytes converts ascii slice to upper-case in-place.
func ( []byte) []byte {
	for  := 0;  < len(); ++ {
		[] = toUpperTable[[]]
	}
	return 
}

// TrimRightBytes is the equivalent of bytes.TrimRight
func ( []byte,  byte) []byte {
	 := len()
	for  > 0 && [-1] ==  {
		--
	}
	return [:]
}

// TrimLeftBytes is the equivalent of bytes.TrimLeft
func ( []byte,  byte) []byte {
	,  := len(), 0
	for  <  && [] ==  {
		++
	}
	return [:]
}

// TrimBytes is the equivalent of bytes.Trim
func ( []byte,  byte) []byte {
	,  := 0, len()-1
	for ;  <= ; ++ {
		if [] !=  {
			break
		}
	}
	for ;  < ; -- {
		if [] !=  {
			break
		}
	}

	return [ : +1]
}

// EqualFoldBytes tests ascii slices for equality case-insensitively
func (,  []byte) bool {
	if len() != len() {
		return false
	}
	for  := len() - 1;  >= 0; -- {
		if toUpperTable[[]] != toUpperTable[[]] {
			return false
		}
	}
	return true
}