@kjk1/

book strings parse split

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

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

import (
	"fmt"
	"strings"
)

func main() {
	// :show start
	s := "this,. is,. a,. string"
	a := strings.Split(s, ",.")
	fmt.Printf("a: %#v\n", a)
	// :show end
}