D
DavidC
Hi,
Hope this is noted by Microsoft.
I have been using the Instrrev function in my code and could not figure out
why I was getting the 'wrong' answer. Well I was reading the description in
help too literally. The description states
"Returns the position of an occurrence of one string within another, from
the end of string." So my understanding was that it counted the number of
characters back from the end of the string and gave a number equal to the
number of characters back from the end of the string. In fact what the
function seems to do is to search the string from the end of the string, and
give the number of characters where the particular character occurs from the
START of the string. This 'error' gave me a few minutes of figuring out.
My suggestion to Microsoft is to make the descriptor a little more obvious
and state that the SEARCH starts from the end and it returns the number of
characters from the START of the string.
Regards
DavidC
Hope this is noted by Microsoft.
I have been using the Instrrev function in my code and could not figure out
why I was getting the 'wrong' answer. Well I was reading the description in
help too literally. The description states
"Returns the position of an occurrence of one string within another, from
the end of string." So my understanding was that it counted the number of
characters back from the end of the string and gave a number equal to the
number of characters back from the end of the string. In fact what the
function seems to do is to search the string from the end of the string, and
give the number of characters where the particular character occurs from the
START of the string. This 'error' gave me a few minutes of figuring out.
My suggestion to Microsoft is to make the descriptor a little more obvious
and state that the SEARCH starts from the end and it returns the number of
characters from the START of the string.
Regards
DavidC