func (s *SortFilter) Num(n int) *SortFilter {
	s.add(func(a, b string) int {
		a1, a2 := column(a, n)
		b1, b2 := column(b, n)
		switch {
		case a1 < b1:
			return -1
		case a1 > b1:
			return +1
		}
		a3, a4 := strconv.ParseFloat(a2, 64)
		b3, b4 := strconv.ParseFloat(b2, 64)
		if a4 != b4 {
			if a4 != nil {  
				return +1
			}
			return -1
		}
		switch {
		case a3 < b3:
			return -1
		case a3 > b3:
			return +1
		}
		return 0
	})
	return s
}
Num sets the next sort key to sort by column n in numeric
order. Column 0 means the entire string. Items that do not have
column n sort to the front.  Items whose column n is not a number
sort to the end.
package stream
import (
	"sort"
	"strconv"
	"unicode"
)
type SortFilter struct {
	cmp []sortComparer
}
func Sort() *SortFilter {
	return &SortFilter{}
}
type sortComparer func(a, b string) int
func column(s string, n int) (int, string) {
	if n == 0 {
		return 0, s
	}
	currentColumn := 0
	wstart := -1
	for i, c := range s {
		sp := unicode.IsSpace(c)
		switch {
		case !sp && wstart < 0:  
			currentColumn++
			wstart = i
		case sp && wstart >= 0 && currentColumn == n:  
			return 0, s[wstart:i]
		case sp && wstart >= 0:  
			wstart = -1
		}
	}
	if wstart >= 0 && currentColumn == n {  
		return 0, s[wstart:]
	}
	return -1, ""
}
func (s *SortFilter) Text(n int) *SortFilter {
	s.add(func(a, b string) int {
		a1, a2 := column(a, n)
		b1, b2 := column(b, n)
		switch {
		case a1 < b1:
			return -1
		case a1 > b1:
			return +1
		case a2 < b2:
			return -1
		case a2 > b2:
			return +1
		}
		return 0
	})
	return s
}
func (s *SortFilter) TextDecreasing(n int) *SortFilter {
	return s.Text(n).flipLast()
}