DEV Community

Antonio
Antonio

Posted on

Lesson 13 Discussion

How does the contains function differ from the hasPrefix and hasSufix functions?

  1. The HasPrefix and HasSufix functions work in the different way, the internal implementation just checks the length of both the strings and substring, and if the are = or the string is longer, then the required part of the string is compared

Top comments (0)