Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Unicode¶
len("尼")3s := "在线中文输入"s在线中文输入len(s)18import "unicode/utf8"q := "A to Z"
qA to Zfc, size1 := utf8.DecodeRuneInString(q)fc65size11lc, size2 := utf8.DecodeLastRuneInString(q)lc90size21fc, size1 := utf8.DecodeRuneInString(s)fc22312size13