Name

InStr Function — Microsoft.VisualBasic.Strings

Synopsis

InStr(start, string1, string2[, compare])    Syntax 1.
InStr(string1, string2[, compare])           Syntax 2.
start required in first syntax; Numeric

The starting position for the search

string1 required; String

The string being searched

string2 required; String

The string being sought

compare optional; CompareMethod enumeration

The type of string comparison

Return Value

An Integer indicating the position of the first occurrence of string2 in string1

Description

Finds the starting position of one string within another.

Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.