Does substring exist in string?

If a String contains another String then it’s known as a substring. The indexOf() method accepts a String and returns the starting position of the string if it exists, otherwise, it will return -1. For example “fastfood”.

Sizin İçin Seçtik  How do I make something optional in regex?

Leave a Reply

Your email address will not be published. Required fields are marked *