"pos" command with user defined starting point?
Posted on 1998-12-27
I think we all know the "pos" command.
It tells us the first occurance of a character in a string.
Unfortunately, "pos" parses a string always from the first character
to its last character.
But I need a source, where I can determine myself at which starting point
the parsing process should begin.
To clarify what I mean, I give you this example:
teststring:="this is a # test string # for the # experts';
Now I want to search for the blank character.
The "normal "pos" command would bring the result "6", because the
first blank in this string is the blank between "this" and "is".
But I need a source code who tells me the first occurence of a blank AFTER
the "#" character.
I want a routine, which in this case brings the result "11", the blank between
"#" and "test".
Have you an idea, how this could be accomplished?
With kind regards