Check out the Pastebin Gadgets Shop. We have thousands of fun, geeky & affordable gadgets on sale :-)Want more features on Pastebin? Sign Up, it's FREE!

Removing chars like a pro

By: a guest on Mar 24th, 2013  |  syntax: Java  |  size: 0.16 KB  |  views: 1,184  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //this removes the last three characters of "chord"
  2. String noteName = new StringBuffer(new StringBuffer(chord).reverse().toString().substring(3)).reverse().toString();
clone this paste RAW Paste Data