INSTR in DOTNET

  • Thread starter Thread starter Guest
  • Start date Start date
Trying to find the susbstitute of INSTR function in c#.Net.

The string type has these two methods. Since they are part of the string
type, you can use them in C#, VB.Net, J# etc... :

indexOf() // works like VB instr()
lastIndexOf() // works like VB instrrev()
 
If you are using VB.NET, the "crutches" are still there in compatibility. To
find an instance, you can use IndexOf() and lastIndexOf() or resort to
regular expressions, which are the better way to go (consider Matches() to
find all instances of a specific string.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside the box!
*************************************************
 
Back
Top