Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
simple_time
vimstart
show_default_sockopts
+print-code-points
#
# Normal rules
--- /dev/null
+package main
+
+import (
+ "fmt"
+ "os"
+)
+
+func usage(retval int) {
+ fmt.Printf("print-code-points: prints out the code points in a unicode string.\n" +
+ "\n" +
+ "usage: print-code-points <string>\n")
+ os.Exit(retval)
+}
+
+func main() {
+ if (len(os.Args) != 2) {
+ usage(1)
+ }
+ str := os.Args[1]
+ for pos, codePoint := range str {
+ fmt.Printf("Code Point 0x%04x: '%s'\n", codePoint, str[pos:pos+1])
+ }
+ os.Exit(0)
+}