strlen(yarn) October 16, 2009Posted by Andor Salga in Open Source, Processing.js.
boolean stringsEqual(String str1, String str2)
if(str1.length() != str2.length())return false;
for(int i = 0; i < str1.length(); i++)
char ai = str1[i];
char bi = str2[i];
if( ai != bi )
This first time around I tried casting to ints. That didn’t work, so I tried chars. So far it looks like it’s working! Feel free to offer suggestions or use this in your code!