Here you can find the source of ChopRt(String this_string, String chomp_off)
static public String ChopRt(String this_string, String chomp_off)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); you may public class Main { static public String ChopRt(String this_string, String chomp_off) { if (!this_string.contains(chomp_off)) return this_string; return this_string.substring(0, this_string.lastIndexOf(chomp_off)); }//from ww w. ja v a 2s. c o m static public String ChopRt(String this_string, String chomp_off, Integer times) { if (times == 1) return ChopRt(this_string, chomp_off); return ChopRt(this_string, chomp_off, times - 1); } }