Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

JavaScript String Comparison (See related posts)

// Example use
// if (isSameString(tags, "_none_")) ...

      function isSameString( s1, s2 )
      {
        alert( "s1: " + s1.toString() );
        alert( "s2: " + s2.toString() );

      	if ( s1.toString() == s2.toString() )
        {
      	  return true;
        }
        else
        {
          return false;
        }
      }

You need to create an account or log in to post comments to this site.


Click here to browse all 5141 code snippets

Related Posts