Answers for "function that finds if a string is inside a string"

PHP
2

How do I check if a string contains a specific word?

$a = 'Hello world?';

if (strpos($a, 'Hello') !== false) { //PAY ATTENTION TO !==, not !=
    echo 'true';
}
if (stripos($a, 'HELLO') !== false) { //Case insensitive
    echo 'true';
}
Posted by: Guest on May-18-2020
0

how to use the if sentence in the string

public boolean contains(CharSequence str)
Posted by: Guest on July-24-2020

Code answers related to "function that finds if a string is inside a string"

Browse Popular Code Answers by Language