package main
import (
    "fmt"
    "strconv"
)
func main() {
    startUnicodeStr := "4E00"
    endUnicodeStr := "9FA5"
    startUnicodeInt, _ := strconv.ParseInt(startUnicodeStr, 16, 64)
    endUnicodeInt, _ := strconv.ParseInt(endUnicodeStr, 16, 64)
    for code := startUnicodeInt; code <=endUnicodeInt; code ++ {
        code ++
        str,_ := strconv.Unquote(fmt.Sprintf("%s%s%s%s", "\"", "\\u", strconv.FormatInt(code, 16), "\""))
        fmt.Print(str)
    }
}
          Created
          November 12, 2018 11:20 
        
      - 
      
- 
        Save alexniver/d42e7e346f3075c34fc18a2385d911a9 to your computer and use it in GitHub Desktop. 
    生成范围内unicode的中文 
  
        
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment