W3Schools
home HOME Tutorials | References | Examples | Forum | About
Search W3Schools :

WMLScript Tutorial
WMLScript HOME
WMLScript Intro
WMLScript How to

WML Libraries
WML Dialogs
WML Float
WML Lang
WML String
WML URL
WML Browser

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Tutorials
W3Schools Forum

Helping W3Schools

WMLScript find() Function


WMLScript String Library Complete WMLScript String Library

The find() function returns the position of a substring in a string.

Syntax

n = String.find(string, substring)

Part Description
n The integer returned from the function
string The string to search
substring The value to search for in the string

Example

var a = String.find("world","rl");
var b = String.find("world","hi");
var c = String.find("world","wo");

Result

a = 2
b = -1
c = 0


WMLScript String Library Complete WMLScript String Library


Learn XML with Stylus Studio XML Editor – Free Download

Stylus Studio provides tools for editing and debugging XML, XSLT, XML Schema, DTD, XQuery, Web Services,and more!

Using Stylus Studio XML Tools You Can:

See why millions use Stylus Studio as their preferred XML tool. Download a FREE TRIAL or watch an online VIDEO DEMO today!



Jump to: Top of Page or HOME or Printer Friendly Printer friendly page

W3Schools provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2008 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999