func (w *SnowballWord) FirstSuffixIfIn(startPos, endPos int, suffixes ...string) (suffix string, suffixRunes []rune) {
	for _, suffix := range suffixes {
		suffixRunes := []rune(suffix)
		if w.HasSuffixRunesIn(0, endPos, suffixRunes) {
			if endPos-len(suffixRunes) >= startPos {
				return suffix, suffixRunes
			} else {
				// Empty out suffixRunes
				suffixRunes = suffixRunes[:0]
				return "", suffixRunes
			}
		}
	}

	// Empty out suffixRunes
	suffixRunes = suffixRunes[:0]
	return "", suffixRunes
}
func (w *SnowballWord) FirstSuffixIfIn(startPos, endPos int, suffixes ...string) (suffix string, suffixRunes []rune) {
	for _, suffix := range suffixes {
		suffixRunes := []rune(suffix)
		if w.HasSuffixRunesIn(0, endPos, suffixRunes) {
			if endPos-len(suffixRunes) >= startPos {
				return suffix, suffixRunes
			} else {
				
				suffixRunes = suffixRunes[:0]
				return "", suffixRunes
			}
		}
	}

	
	suffixRunes = suffixRunes[:0]
	return "", suffixRunes
}
func ( w * SnowballWord ) FirstSuffixIfIn ( startPos , endPos int , suffixes ... string ) ( suffix string , suffixRunes [ ] rune ) { for _ , suffix := range suffixes { suffixRunes := [ ] rune ( suffix ) if w . HasSuffixRunesIn ( 0 , endPos , suffixRunes ) { if endPos - len ( suffixRunes ) >= startPos { return suffix , suffixRunes } else { // Empty out suffixRunes suffixRunes = suffixRunes [ : 0 ] return " " , suffixRunes } } } // Empty out suffixRunes suffixRunes = suffixRunes [ : 0 ] return " " , suffixRunes }
// Find the first suffix that ends at `endPos` in the word among
// those provided; then,
// check to see if it begins after startPos.  If it does, return
// it, else return the empty string and empty rune slice.  This
// may seem a counterintuitive manner to do this.  However, it
// matches what is required most of the time by the Snowball
// stemmer steps.
//
Find the first suffix that ends at endPos in the word among those provided ; then check to see if it begins after startPos . If it does return it else return the empty string and empty rune slice . This may seem a counterintuitive manner to do this . However it matches what is required most of the time by the Snowball stemmer steps .