Finding a string inside a larger string

Explains how to find a string inside of a bigger string

<script language="javascript1.1">
 var sSupersetString="abcdefg";
 var sSubsetString="abc";
 var lPosition=sSupersetString.indexOf(sSubsetString);
Returns the value 2 meaning abc was found
starting with the third character.

You might also like...


David Nishimoto NishiSoft provides Part I of the Information Technology Project collaboration. Sign up and list your IT project tasks, assign task too friends, and get percent complete task. Part will include a wo...


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.”