code: func isInteger(s string) bool {
  
  	l := len(s)
  
  	if l == 0 {
  		return false
  	}
  
  	i := 0
  
  	for ; i < l; i++ {
  		if !IsSpaceChar(s[i]) {
  			break
  		}
  	}
  
  	if s[i] == '-' {
  		i++
  	}
  
  	n := 0
  	for ; i < l; i++ {
  		if !IsDigit(rune(s[i])) {
  			break
  		}
  		n++
  	}
  
  	if n == 0 {
  		return false
  	}
  
  	for ; i < l; i++ {
  		if !IsSpaceChar(s[i]) {
  			return false
  		}
  	}
  
  	return true
  }
docs: // IsInteger returns true for strings containing exclusively digits, with an
  // optional minus sign at the beginning. Starting and trailing spaces are
  // allowed.