• Post Reply Bookmark Topic Watch Topic
  • New Topic

kindly help  RSS feed

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
how do i compare whether two strings are same.which method i use.
dhriti
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use
if(str1 == str2)alert('match');
or you can use regular expressions and match
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!