// The Filter() method creates a new Str with all elemetns taht pass the test implemented
// by the provided function.
The Filter() method creates a new Str with all elemetns taht pass the test implemented
by the provided function.
// The Filter () method creates a new Str with all elemetns taht pass the test implemented // by the provided function .
func (S Str) Filter(cond func(s string) bool) (r Str) {
	for _, v := range S {
		if cond(v) {
			r = append(r, v)
		}
	}
	return r
}
func ( S Str ) Filter ( cond func ( s string ) bool ) ( r Str ) { for _ , v := range S { if cond ( v ) { r = append ( r , v ) } } return r }
The Filter() method creates a new Str with all elemetns taht pass the test implemented
by the provided function.
The Filter () method creates a new Str with all elemetns taht pass the test implemented by the provided function .