Here you can find the source of ChopAllRt(String this_string, String chomp_off)
static public String ChopAllRt(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 ChopAllRt(String this_string, String chomp_off) { if (!this_string.contains(chomp_off)) return this_string; return this_string.substring(0, this_string.length() - SeekLf(this_string, chomp_off.charAt(0))); }//from w w w .j av a 2 s . c om static private int SeekLf(String this_string, char c) { for (int i = 0; i < this_string.length(); i++) { if (this_string.charAt(i) == c) return i; } return -1; } }