Java examples for java.lang:String Strip
remove End
//package com.java2s; public class Main { public static String removeEnd(String string, String suffix) { if (string.endsWith(suffix)) { return string.substring(0, string.length() - suffix.length()); }/*w w w. j av a2 s . co m*/ return string; } }