(text string)
| 12 | ) |
| 13 | |
| 14 | func cleanString(text string) string { |
| 15 | cleanText := strings.ToLower(text) // Convert to lowercase |
| 16 | cleanText = strings.Join(strings.Fields(cleanText), "") // Remove spaces |
| 17 | regex, _ := regexp.Compile(`[^\p{L}\p{N} ]+`) // Regular expression for alphanumeric only characters |
| 18 | return regex.ReplaceAllString(cleanText, "") |
| 19 | } |
| 20 | |
| 21 | func IsPangram(text string) bool { |
| 22 | cleanText := cleanString(text) |