×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Joakim Johansson
Added: Dec 3, 2015 8:03 AM
Views: 10
Tags: string
Removes the last occurrance of a letter in a string
  1. String value = ",ABC,";
  2. String withoutLastSelectedLetter = (value.endsWith(",")) ? value.substring(0, value.lastIndexOf(",")) : value;