(String str, String chars)
| 801 | } |
| 802 | |
| 803 | public static String trimTrailing(String str, String chars) |
| 804 | { |
| 805 | if (str != null && chars != null) |
| 806 | { |
| 807 | int i = str.length(); |
| 808 | int j; |
| 809 | |
| 810 | for (j = i; j > 0; --j) |
| 811 | { |
| 812 | char c0 = str.charAt(j - 1); |
| 813 | |
| 814 | if (chars.indexOf(c0) < 0) |
| 815 | { |
| 816 | break; |
| 817 | } |
| 818 | } |
| 819 | |
| 820 | return j == i ? str : str.substring(0, j); |
| 821 | } |
| 822 | else |
| 823 | { |
| 824 | return str; |
| 825 | } |
| 826 | } |
| 827 | } |
no test coverage detected