src/org/kocakosm/pitaya/util/Strings.java
public static String stripRight(String str, int n)
	{
		Parameters.checkCondition(n >= 0);
		int end = Math.max(0, str.length() - n);
		return str.substring(0, end);
	}
public static String stripRight(String str, int n)
	{
		Parameters.checkCondition(n >= 0);
		int end = Math.max(0, str.length() - n);
		return str.substring(0, end);
	}
Returns the new {@code String} obtained by stripping the last
{@code n} characters from the given one.

@param str the {@code String} to be stripped.
@param n the number of characters to strip.

@return the stripped {@code String}.

@throws NullPointerException if {@code str} is {@code null}.
@throws IllegalArgumentException if {@code n} is negative.