Pages
Home
Java
Android
Php
Cake PHP
jQuery
Grails
All Pages
Showing posts with label
String Starts With
.
Show all posts
Showing posts with label
String Starts With
.
Show all posts
Tuesday, December 4, 2012
How to know that a string starts/ends with a specific string in jQuery
One option is to use regular expressions:
if
(
str
.
match
(
"^Hello"
))
{
// ...
}
if
(
str
.
match
(
"World$"
))
{
// ...
}
Older Posts
Home
Subscribe to:
Posts (Atom)