REBOL Document

Offset? - Function Summary


Summary:

Returns the offset between two series positions.

Usage:

offset? series1 series2

Arguments:

series1 - The series1 argument. (must be: series)

series2 - The series2 argument. (must be: series)

Description:

Return the difference of the indexes for two positions within a series.


 str: "abcd"
 p1: next str
 print offset? str p1
 1


 str: "abcd"
 p1: next str
 p2: find str "d"
 print offset? p1 p2
 2

Related:

head - Returns the series at its head.
head? - Returns TRUE if a series is at its head.
index? - Returns the index number of the current position in the series.
length? - Returns the length of the series from the current position.
pick - Returns the value at the specified position in a series.
skip - Returns the series forward or backward from the current position.
tail - Returns the series at the position after the last value.
tail? - Returns TRUE if a series is at its tail.

AltStyle によって変換されたページ (->オリジナル) /