Akash Varshney
Can you write a program for find a string in a given string (string search) in JavaScript ?
By Akash Varshney in .NET on Sep 26 2015
  • Vishal Jadav
    Aug, 2016 8

    we can use function fnStrInStr(myStrVal,srchStr) {if(fnStrInStr.indexOf(srchStr)>0) {alert('String found');} else{alert('String Not found');} }

    • 0
  • Mayur  Gujrathi
    Apr, 2016 14

    use searchstring.lastIndexOf('string to be search') > -1

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS