@kjk1/

gobook range string

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.7963781014753282","path":"main.go","file":{"path":"main.go","content":{"asEncoding":{"base64":"cGFja2FnZSBtYWluCgppbXBvcnQgImZtdCIKCmZ1bmMgbWFpbigpIHsKCS8vIDpzaG93IHN0YXJ0CglzIDo9ICJIZXkg5LiW55WMIgoJZm9yIGlkeCA6PSByYW5nZSBzIHsKCQliIDo9IHNbaWR4XQoJCWZtdC5QcmludGYoImlkeDogJWQsIGJ5dGU6ICVkXG4iLCBpZHgsIGIpCgl9CgkvLyA6c2hvdyBlbmQKfQo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package main

import "fmt"

func main() {
	// :show start
	s := "Hey 世界"
	for idx := range s {
		b := s[idx]
		fmt.Printf("idx: %d, byte: %d\n", idx, b)
	}
	// :show end
}