(s string)
| 7 | ) |
| 8 | |
| 9 | func replaceBlank(s string) (string, bool) { |
| 10 | if len([]rune(s)) > 1000 { |
| 11 | return s, false |
| 12 | } |
| 13 | for _, v := range s { |
| 14 | if string(v) != " " && unicode.IsLetter(v) == false { |
| 15 | return s, false |
| 16 | } |
| 17 | } |
| 18 | return strings.Replace(s, " ", "%20", -1), true |
| 19 | } |
| 20 | |
| 21 | func main() { |
| 22 | s1 := "Hello World" |