// Next turns to the next position on the cursor c.
// It returns nil at the end on the cursor c.
Next turns to the next position on the cursor c.
It returns nil at the end on the cursor c.
// Next turns to the next position on the cursor c . // It returns nil at the end on the cursor c .
func (c *Cursor) Next() *Position {
	n := c.curr.cmp(&c.end)
	if n == 0 {
		if c.pi == len(c.ps)-1 {
			return nil
		}
		c.pi++
		c.curr = ipToIPv6Int(c.ps[c.pi].IP.To16())
		c.start = c.curr
		if c.ps[c.pi].IP.To4() != nil {
			c.end = c.ps[c.pi].lastIPv4MappedIPv6Int()
		}
		if c.ps[c.pi].IP.To16() != nil && c.ps[c.pi].IP.To4() == nil {
			c.end = c.ps[c.pi].lastIPv6Int()
		}
	} else {
		c.curr.incr()
	}
	return c.Pos()
}
func ( c * Cursor ) Next ( ) * Position { n := c . curr . cmp ( & c . end ) if n == 0 { if c . pi == len ( c . ps ) - 1 { return nil } c . pi ++ c . curr = ipToIPv6Int ( c . ps [ c . pi ] . IP . To16 ( ) ) c . start = c . curr if c . ps [ c . pi ] . IP . To4 ( ) != nil { c . end = c . ps [ c . pi ] . lastIPv4MappedIPv6Int ( ) } if c . ps [ c . pi ] . IP . To16 ( ) != nil && c . ps [ c . pi ] . IP . To4 ( ) == nil { c . end = c . ps [ c . pi ] . lastIPv6Int ( ) } } else { c . curr . incr ( ) } return c . Pos ( ) }
Next turns to the next position on the cursor c.
It returns nil at the end on the cursor c.
Next turns to the next position on the cursor c . It returns nil at the end on the cursor c .