(str string)
| 718 | } |
| 719 | |
| 720 | func lowerASCII(str string) (string, error) { |
| 721 | runes := []rune(str) |
| 722 | for i, r := range runes { |
| 723 | if r <= unicode.MaxASCII { |
| 724 | r = unicode.ToLower(r) |
| 725 | runes[i] = r |
| 726 | } |
| 727 | } |
| 728 | return string(runes), nil |
| 729 | } |
| 730 | |
| 731 | func replace(str, old, new string) (string, error) { |
| 732 | return strings.ReplaceAll(str, old, new), nil |