title: Unity: Comparing strings doesn't seem to work in this case?
body: <p>I'm trying to compare to strings in a function to be able to do stuff if it's true. However, for some reason the two strings I'm comparing are never equal to eachother.</p>
  
  <p>I am creating a new string in a function, getting data from a Json and then comparing that string with another string in another class. This doesn't work for some reason. The Debug shows that both strings are equal, but the if-statement returns false.</p>
  
  <p>I created two other string variables (hello &amp; hello2) with the same value ("Hello") and this time it's comparing correctly.</p>
  
  <p>Check the images below. What am I doing wrong?
  As you can see in the console, both strings have the same value:</p>
  
  <p>Image 1. Here's where I create the string (zoneId).</p>
  
  <p><a href="https://i.stack.imgur.com/fJCVV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fJCVV.png" alt="enter image description here"></a></p>
  
  <p>Image 2. Further down in the same function, same for-loop.
  Here's where I'm trying to compare the string created in this function with another string from another class.
  <a href="https://i.stack.imgur.com/xHFXU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xHFXU.png" alt="enter image description here"></a></p>
  
  <p>Image 3. As you can see in the console it's looping through the jsonArray. But it's returning false even though it's clear that both strings have the same value.
  <a href="https://i.stack.imgur.com/mOjF5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mOjF5.png" alt="enter image description here"></a></p>
  
  <p>Image 4 and 5. Here I am testing with two other strings inside the function and they are working fine.
  Does it has something to do calling a string from another class?</p>
  
  <p><a href="https://i.stack.imgur.com/IyJai.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IyJai.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/Ma4fH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ma4fH.png" alt="enter image description here"></a></p>
  
  <p>Here's how my other string in userInfo is set up: </p>
  
  <pre><code>public string userID { get; private set; } 
  </code></pre>