title: Java String.split() and compare
body: <p>Im working with flying saucer and want to export an xhtml to an pdf. 
  Everything works fine, but now I want to add an empty column, for example for descriptions or something. </p>
  
  <p>I want to create a method addColumn(). which should add in every row of the table at the end a new, empty cell.</p>
  
  <p>I tried following code:</p>
  
  <pre><code>            String[] arr = content.split("&lt;td");
              String test = "";
              for (int i = 0; i &lt; arr.length; i++) {
                  if(i != 0){
                  arr[i] = "&lt;td" + arr[i];
                  test += arr[i];
                  }
              }
  </code></pre>
  
  <p>This should split the content on every beginning <code>"td"</code> tag. 
  <code>String.split("&lt;td")</code> removes the <code>"&lt;td"</code> from the content so i want to add it again.</p>
  
  <p>But if i compare those:</p>
  
  <pre><code>if(test.equalsIgnoreCase(content)){
       System.out.println("SUCCESS");
  }
  else{
       System.out.println("FAIL");
  }
  </code></pre>
  
  <p>I always fail.</p>
  
  <p>Just help me to get the right content back out of the array, this would make me go a step in the right direction!</p>
  
  <p>Thank you.</p>