multiinstr()
Description
This function performs a .instr() for each of the characters in the searchchars variable against the src string. The character found closest to the beginning of the string is returned in termchar and its position is the return value of the function. This is particularly useful when any of several characters may be expected when parsing a string and it is important to find the first one, but without the expense of stepping through the string character by character. Returns the position of the character returned in termchar counted from the first character of the string. If none of the characters passed is found, then 0 will be returned and termchar will be the empty string.
Prototype
multiinstr
(
string
,
string src
,
string searchchars
)
termchar
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
src | None | string | |
searchchars | None | string | |
termchar | None | string |