func (w *SnowballWord) FirstPrefix(prefixes ...string) (foundPrefix string, foundPrefixRunes []rune) {
	found := false
	rsLen := len(w.RS)

	for _, prefix := range prefixes {
		prefixRunes := []rune(prefix)
		if len(prefixRunes) > rsLen {
			continue
		}

		found = true
		for i, r := range prefixRunes {
			if i > rsLen-1 || (w.RS)[i] != r {
				found = false
				break
			}
		}
		if found {
			foundPrefix = prefix
			foundPrefixRunes = prefixRunes
			break
		}
	}
	return
}
func (w *SnowballWord) FirstPrefix(prefixes ...string) (foundPrefix string, foundPrefixRunes []rune) {
	found := false
	rsLen := len(w.RS)

	for _, prefix := range prefixes {
		prefixRunes := []rune(prefix)
		if len(prefixRunes) > rsLen {
			continue
		}

		found = true
		for i, r := range prefixRunes {
			if i > rsLen-1 || (w.RS)[i] != r {
				found = false
				break
			}
		}
		if found {
			foundPrefix = prefix
			foundPrefixRunes = prefixRunes
			break
		}
	}
	return
}
func ( w * SnowballWord ) FirstPrefix ( prefixes ... string ) ( foundPrefix string , foundPrefixRunes [ ] rune ) { found := false rsLen := len ( w . RS ) for _ , prefix := range prefixes { prefixRunes := [ ] rune ( prefix ) if len ( prefixRunes ) > rsLen { continue } found = true for i , r := range prefixRunes { if i > rsLen - 1 || ( w . RS ) [ i ] != r { found = false break } } if found { foundPrefix = prefix foundPrefixRunes = prefixRunes break } } return }
// Return the first prefix found or the empty string.
Return the first prefix found or the empty string .