Skip to content

Instantly share code, notes, and snippets.

@mattn
Created October 27, 2015 05:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mattn/d92289dadc1708ad5d09 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"strings"
)
func main() {
s := `あなたとjavaいますぐdownload`
rep := strings.NewReplacer(
"java", "ジャバ",
"Java", "ジャバ",
"Download", "ダウンロード",
"download", "ダウンロード",
)
fmt.Println(rep.Replace(s))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment