title: Java String trim has no effect
body: <p>Java String trim is not removing a whitespace character for me.</p>
  
  <pre><code>String rank = (some method);
  System.out.println("(" + rank + ")");
  </code></pre>
  
  <p>The output is <code>(1  )</code>.  Notice the space to the right of the 1.</p>
  
  <p>I have to remove the trailing space from the string <code>rank</code> but neither <code>rank.trim()</code> nor <code>rank.replace(" ","")</code> removes it.  </p>
  
  <p>The string <code>rank</code> just remains the same either way.</p>
  
  <p><strong>Edit: Full Code:</strong>:</p>
  
  <pre><code>Document doc = Jsoup.connect("http://www.4icu.org/ca/").timeout(1000000).get();
  Element table = doc.select("table").get(7);
  Elements rows = table.select("tr");
  for (Element row: rows) {
    String rank = row.select("span").first().text().trim();
    System.out.println("("+rank+")");
  }
  </code></pre>
  
  <p>Why can't I remove that space?</p>