Find the position of the first occurrence of a substring in a string

I am not a method to find a string in another string. It should return the position of the first occurrence of the substring. (In VB 2008!)

+4
source share
3 answers

I think you are looking for the InStr function, see InStr in msdn

+1
source

position = instr ([stringField] and "," ")

We are looking for the first space in an empty string with the name [stringField]. "And" "" avoid the error situation when there are no spaces in [stringField].

0
source

All Articles