Golang unicode.IsDigit() function example
package unicode
Golang unicode.IsDigit() function usage example.
package main
import (
"fmt"
"unicode"
)
func main() {
digit := unicode.IsDigit('A')
fmt.Println("A is a digit ? : ", digit)
digit = unicode.IsDigit('1')
fmt.Println("1 is a digit ? : ", digit)
}
Output :
A is a digit ? : false
1 is a digit ? : true
Reference :
http://golang.org/pkg/unicode/#IsDigit
Advertisement
Something interesting
Tutorials
+10.5k RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
+5.6k Python : Print unicode escape characters and string
+7k Golang : How to call function inside template with template.FuncMap
+10.9k Golang : Create Temporary File
+14.6k Golang : GUI with Qt and OpenCV to capture image from camera
+7.4k Android Studio : How to detect camera, activate and capture example
+36.3k Golang : Convert(cast) int64 to string
+4.8k Golang : A program that contain another program and executes it during run-time
+36.5k Golang : Save image to PNG, JPEG or GIF format.
+5k Golang : Display packages names during compilation
+7.8k Golang : Lock executable to a specific machine with unique hash of the machine
+15.6k Golang : Get checkbox or extract multipart form data value example