VBScript: InStr Function.. ASP code
Full Syntax: InStr([start,] strSearch, strFind [,compare])
Syntax: InStr(strSearch, strFind)
The Function will return 0 if strFind is not found.
The Function will return the first position in the strSearch if found.
<%
test1="Now is the time for all good men to come to the aid of
their country"
test2="time"
intLocation = InStr(test1,test2)
If intLocation>0 Then
Response.write intLocation
Else
Response.write "Not Found"
End if
%> |
|