@kjk1/

book strings convert case

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

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

import (
	"fmt"
	"strings"
)

func main() {
	// :show start
	s := "Mixed Case"
	fmt.Printf("ToLower(s): '%s'\n", strings.ToLower(s))
	fmt.Printf("ToUpper(s): '%s'\n", strings.ToUpper(s))
	fmt.Printf("ToTitle(s): '%s'\n", strings.ToTitle(s))
	// :show end
}