Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I need to check thatwhether a string contains another string or not?
var str1 = "ABCDEFGHIJKLMNOP"; var str2 = "DEFG";
Which function do I use to find out if str1 contains str2?
I need to check that a string contains another string or not?
I need to check whether a string contains another string or not?
I need to check that a string to see if it contains another string. or not?
WhatWhich function do I use to find out if str1 contains str2?
I need to check a string to see if it contains another string.
What function do I use to find out if str1 contains str2?
Cheers, Thomas.