title: Delete the last two characters of the String
body: <p>How can I delete the last two characters <code>05</code> of the simple string?</p>
  
  <p><strong>Simple:</strong></p>
  
  <pre><code>"apple car 05"
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>String[] lineSplitted = line.split(":");
  String stopName = lineSplitted[0];
  String stop =   stopName.substring(0, stopName.length() - 1);
  String stopEnd = stopName.substring(0, stop.length() - 1);
  </code></pre>
  
  <p>orginal line before splitting ":"</p>
  
  <pre><code>apple car 04:48 05:18 05:46 06:16 06:46 07:16 07:46 16:46 17:16 17:46 18:16 18:46 19:16
  </code></pre>