title: Erlang string comparisons aren't working
body: <p>I've been stumped just trying to compare two bits of data for hours.</p>
  
  <p>This is essentially what i've written..</p>
  
  <pre><code>find_client(Search, [Client|Client_list])-&gt;
     {Name,Socket} = Client,
     io:fwrite("Name&gt;~s&lt;~n",[Name]),
     io:fwrite("Search&gt;~s&lt;~n",[Search]),
     case string:equal(Name,Search) of
        true-&gt;
           do_something;
        false-&gt;
           do_something_else
     end;
  find_client(Search,[])-&gt;
     not_found.
  </code></pre>
  
  <p>The problem is that do_something_else is always returned even when i'm convinced they should be equal! io:fwrite prints out exactly the same thing to the console in my tests, ie- </p>
  
  <pre><code>Name&gt;name1&lt;
  Search&gt;name1&lt;
  </code></pre>
  
  <p>Before I tried string:equal I was trying to do my own pattern match but no matter the combination I couldn't seem to get it to work.</p>
  
  <p>Am I missing something? I'd really appreciate a pait of fresh eyes or a suggestion for another way to try.</p>