Search:

Type: Posts; User: mgrootsch

Search: Search took 0.08 seconds; generated 35 minute(s) ago.

  1. Replies
    5
    Views
    11,267

    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
    11,267

    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