
28 Feb
2014
28 Feb
'14
5:24 p.m.
On 2/28/2014 8:12 AM, CrÃstian Viana wrote:
Am 27-02-2014 18:16, schrieb Adam King:
- if (name.contains("/")) { + if (name.indexOf("/")!=-1) { A quick curious question: is there really a difference in those commands? I always thought "contains" was usually implemented as "indexOf != -1" anyway.
String.contains() is experimental function that doesn't work on all browsers, otherwise I would assume you are correct that its the same thing under the covers. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Obj... -- Adam King <rak@linux.vnet.ibm.com> IBM C&SI