Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAnagramArray ¶
Expect ASCII chars only
Example (Output) ¶
anagramTests := [][2]string{
{"heart", "earth"},
{"checklen", "oops"},
{"heart", "bartch"},
{"", ""},
}
var actual bool
for _, in := range anagramTests {
actual = IsAnagramArray(in[0], in[1])
fmt.Printf("IsAnagramArray of '%s' and '%s' returns %v\n", in[0], in[1], actual)
}
Output: IsAnagramArray of 'heart' and 'earth' returns true IsAnagramArray of 'checklen' and 'oops' returns false IsAnagramArray of 'heart' and 'bartch' returns false IsAnagramArray of '' and '' returns true
func IsAnagramMap ¶
Example (Output) ¶
anagramTests := [][2]string{
{"heart", "earth"},
{"checklen", "oops"},
{"heart", "bartch"},
{"", ""},
}
var actual bool
for _, in := range anagramTests {
actual = IsAnagramMap(in[0], in[1])
fmt.Printf("IsAnagramMap of '%s' and '%s' returns %v\n", in[0], in[1], actual)
}
Output: IsAnagramMap of 'heart' and 'earth' returns true IsAnagramMap of 'checklen' and 'oops' returns false IsAnagramMap of 'heart' and 'bartch' returns false IsAnagramMap of '' and '' returns true
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.