Navigation: Scripting Reference Manual > Functions & Subroutines > InStrOneOf

 

InStrOneOf

 

Contact Us: fredsupport@photonengr.com

 

Description

Finds the first occurrence of a character in a specified string, starting at a specific point.

 

Syntax

location = InStrOneOf ( startPoint, searchString, findFirst )

 

Parameters

location (Long)

The location of the first character from findFirst that was found in searchString.

 

startPoint As Long

Specifies where in the string to begin searching. A value of 1 represents the first character position.

 

searchString As String

Specifies the string to search.

 

findFirst As String

A set of one or more characters to look for in searchString.

 

Remarks

This function finds the first occurrence from a list of characters in a specified string, starting at a specific point. The function returns -1 if there is a problem, such as one of the specified characters not being found, or the starting point being out of range.

 

As an example, if findFirst="abcd", then InstrOneOf will return a value >0 if any character in searchString is an a, b, c, or d. Use InStr to search for the multiple character string "abcd".

 

See Also

ParseString

Instr (BASIC command)

 

 

 

 

 

Copyright © Photon Engineering, LLC