Standard library / bytes
bytes.EqualFold()
Tests equality using Unicode simple case folding, not normalization or full multi-rune case folding. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func EqualFold(s, t []byte) boolParameters & Attributes
| Name | Type | Description |
|---|---|---|
| s | []byte | Input text or sequence. |
| t | []byte | Other text to compare. |
Return Value
bool
Tests equality using Unicode simple case folding, not normalization or full multi-rune case folding.
Working Example
Example Snippetgo
package main
import ( "bytes" "fmt")
func main() { fmt.Println(bytes.EqualFold([]byte("Go"), []byte("gO")))}