STRING CONTAINS A SUBSTRING
************************************************************************
W.A.P TO CHECK WEATHER A STRING CONTAINS A SUBSTRING OR NOT
************************************************************************
JAVA Program
Output:
************************************************************************
C Program
Online Compiler
************************************************************************
C++ Program
Online Compiler
************************************************************************
C# Program
************************************************************************
PHP Program
Php is a serverside scripting language.
************************************************************************
JAVASCRIPT Program
<script type="text/javascript">
var string = prompt("Please enter a string: ");
var substring = "the";
var test1= string.includes(substring);
console.log(test1);
var test2 = string.indexOf(substring);
console.log(test2);
</script>
************************************************************************
PYTHON Program
************************************************************************
Comments
Post a Comment