We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd91314 commit b6cfff9Copy full SHA for b6cfff9
metaphone/metaphonebr.go
@@ -12,7 +12,7 @@ type ruleType struct {
12
phoneticRepresentation string
13
offset int
14
increment int
15
- isFirst bool
+ isFirstCharOfInput bool //Skips vowels unless one of them is the first character of the input string
16
}
17
18
const (
@@ -50,7 +50,7 @@ func Pack(s string) string {
50
51
//for every rule on rules array
52
for _, rule := range rules {
53
- if rule.isFirst && (i > 0) {
+ if rule.isFirstCharOfInput && (i > 0) {
54
continue
55
56
if (i + rule.offset) < 0 {
0 commit comments