• Reference Guide


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

See Also