Search:

Type: Posts; User: mgrootsch

Search: Search took 0.36 seconds.

  1. Replies
    5
    Views
    7,644

    Re: contains vs. indexOf

    Better practice, maybe... But hardly worth the trouble of having to check all those differences that light up in CVS (in my opinion).

    Thanks for the replies.
    Marcel
  2. Replies
    5
    Views
    7,644

    contains vs. indexOf

    Is there any situation where

    if (str1.contains(str2)) {}
    and
    if (str1.indexOf(str2)>=0) ) {}

    might be different?
    A colleague has been changing all occurrences of the 1st form for the 2nd....
Results 1 to 2 of 2