1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0//EN">
6 <style type=
"text/css">
9 font-family: verdana
, sans-serif
;
29 text-decoration:underline
;
34 text-decoration: none
;
47 border-bottom-width:1px;
48 border-bottom-style:dotted
;
64 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
67 <big><tt>Global.String.prototype.contains
(str,
fromIndex)
</tt></big><br>
73 function returns true if a string contains the string
74 passed as argument
<br><br>
77 <li><b>Parameter
</b> <code>String
</code>:
<br/>
78 string to search for
<li><b>Parameter
</b> <code>Int
</code>:
<br/>
79 Position to start search
<li><b>Parameter
</b> <code>Boolean
</code>:
<br/>
91 <table width=
"90%" border=
"0" cellspacing=
"1" cellpadding=
"5">
93 <td>Sourcecode in /root/helma-
1.6.1/modules/core/String.js:
94 <pre><font color=
"#aaaaaa">441:
</font> String.prototype.contains = function(str, fromIndex) {
95 <font color=
"#aaaaaa">442:
</font> if (this.indexOf(str, fromIndex ? fromIndex :
0)
> -
1)
96 <font color=
"#aaaaaa">443:
</font> return true;
97 <font color=
"#aaaaaa">444:
</font> return false;
98 <font color=
"#aaaaaa">445:
</font> }