Which of the following ways is an efficient way of determining substring containment?
if (str.indexOf("/") > -1)
or
if (str.contains("/"))
No comments:
Post a Comment