code: func char2hex(a rune) int {
  	if a >= 48 && a <= 57 { // 0-9
  		return int(a) - 48
  	} else if a >= 65 && a <= 70 { // A-F
  		return int(a) - 55
  	} else if a >= 97 && a <= 102 {
  		// a-f
  		return int(a) - 87
  	}
  	return -1
  }
docs: // Converts a hex character to its integer value.
  // '0' becomes 0, '9' becomes 9
  // 'A' becomes 10, 'F' becomes 15
  // 'a' becomes 10, 'f' becomes 15
  // Returns -1 on error.