Progress Monitor for IdealProgrammer.com
Take Swift, Intelligent, Massive, Planned, Loving, Effective (S.I.M.P.L.E.) Action to Transform Self into Ideal
Skip Repetitive Navigational Links
Home
News
Presenters
Register
Contact
Categories
Titles
Converter
Code Samples
C# ASP.NET
C# Console
HTML
JavaScript
SQL Server
VB ASP.NET
VB Console
Please login
VB.NET InStrRev()
Description:
Illustrates using VB.NET InStrRev() Code Example.
Example Class:
Public Class clsInStrRev Public Sub Main() '**************************************************************************************** ' Example #1: InStrRev(stringcheck,stringmatch,start,comparemethod) - returns integer ' of the position of the first occurrence of one string within another, starting from the ' right side of the string. ' ' stringcheck - Required. String expression being searched. ' stringmatch - Required. String expression being searched for. ' start - Optional. Numeric expression setting the one-based starting position for each ' search, starting from the left side of the string. If Start is omitted then –1 is used, ' meaning the search begins at the last character position. Search then proceeds from right ' to left. ' comparemethod - Optional - integer indicating binary or text '**************************************************************************************** Console.WriteLine("Example #1: InStrRev(stringcheck,stringmatch,start,comparemethod) ") Dim strString1 As String = "Hello World" ' Return Uppercase Console.WriteLine(InStrRev(strString1, "l").ToString()) 'Returns 10 'write blank line to make output easier to read Console.WriteLine() 'Prevent console from closing before you press enter Console.ReadLine() End Sub End Class
Example Module:
Module Module1 Sub Main() Dim myclsInStrRev As New clsInStrRev myclsInStrRev.Main() End Sub End Module
Home
News
Presenters
Register
Contact
Categories
Titles
Converter
Code Samples
C# ASP.NET
C# Console
HTML
JavaScript
SQL Server
VB ASP.NET
VB Console