• Reference Guide


skip_bytes(bin, n, set)
Returns the index of the first byte in the bin data after the position n (including the byte at the index n) that is not contained in the set. In other words, the function skips all byte values contained in the specified set. If no such byte is found, the function returns the size of the bin data. The index of the first byte is 0. If n is negative, 0 is used.
The bin and set parameters are of the Binary type. The parameter n and the return value are of the Int type.
The functions whose name begins with skip_… serve to analyze a string or binary data. The best way to use them is to create a variable containing an index (pointer) of the current position within the data. This variable is passed to the appropriate skip­_… function as the parameter determining the place, where to search the data from. The resulting value (the new pointer) is then assigned back to the variable.
pos = skip_bytes(str, pos, " `t`n`r")
This example skips all space characters (i.e. the characters that are a space, tabulator or a new-line).
Note: this function serves to manipulate binary data. To handle a string, use the analogical function skip_chars.

See Also