Golang unicode.In() function example
package unicode
Golang unicode.In() function usage example. Use to check if a given rune is from within ranges of RangeTable.
package main
import (
"fmt"
"unicode"
)
var tab unicode.RangeTable
func main() {
memberShip := unicode.In('A', &tab)
fmt.Println("A is a member of tab ? : ", memberShip)
memberShip = unicode.In('界', unicode.Han)
fmt.Println("界 is a member of unicode.Han ? : ", memberShip)
}
Output :
A is a member of tab ? : false
界 is a member of unicode.Han ? : true
References :
Advertisement
Something interesting
Tutorials
+9.7k Golang : Eroding and dilating image with OpenCV example
+10.8k Golang : Natural string sorting example
+22.4k Golang : How to read JPG(JPEG), GIF and PNG files ?
+7.8k Golang : Regular Expression find string example
+5.2k Golang : Calculate half life decay example
+12.1k Golang : Perform sanity checks on filename example
+9.3k Golang : How to protect your source code from client, hosting company or hacker?
+7.9k Golang : Grayscale Image
+5.8k Linux : Disable and enable IPv4 forwarding
+31.7k Golang : How to convert(cast) string to IP address?
+13k Swift : Convert (cast) Int to String ?