Skip to content

Instantly share code, notes, and snippets.

@veer66
Created August 20, 2013 12:29
Show Gist options
  • Save veer66/6280744 to your computer and use it in GitHub Desktop.
Save veer66/6280744 to your computer and use it in GitHub Desktop.
อันนี้ได้ 6 2 นะ รู้สึกว่ามันดูยุ่ง ๆ ยาวเกินสำหรับคนที่ยุ่งกับพวกนี้เยอะ ๆ
package main;
import (
"fmt"
"unicode/utf8"
)
func main() {
s := "กา"
fmt.Println(len(s), utf8.RuneCountInString("กา"))
}
// Adapted from http://stackoverflow.com/questions/12668681/go-language-string-length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment