mirror of
https://github.com/br0xen/termbox-util.git
synced 2025-08-18 11:44:06 -05:00
Adding Alpha-Numeric Tester
This commit is contained in:
@@ -23,7 +23,7 @@ const (
|
|||||||
|
|
||||||
// KeyIsAlphaNumeric Returns whether the termbox event is an
|
// KeyIsAlphaNumeric Returns whether the termbox event is an
|
||||||
// Alpha-Numeric Key Press
|
// Alpha-Numeric Key Press
|
||||||
func KeyIsAlphaNumeric(event termbox.Event) {
|
func KeyIsAlphaNumeric(event termbox.Event) bool {
|
||||||
k := event.Ch
|
k := event.Ch
|
||||||
if (k >= 'a' && k <= 'z') || (k >= 'A' && k <= 'Z') || (k >= '0' && k <= '9') {
|
if (k >= 'a' && k <= 'z') || (k >= 'A' && k <= 'Z') || (k >= '0' && k <= '9') {
|
||||||
return true
|
return true
|
||||||
|
Reference in New Issue
Block a user