Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* @return the padded string.
*/
public static String padAtStart(String string, int minLength, char padChar) {
return Strings.padStart(string, minLength, padChar);
}
/**
* Returns a string, of length at least {@code minLength}, consisting of {@code string} appended
* with as many copies of {@code padChar} as are necessary to reach that length. For example,
*
*
*
* @return the padded string
*/
public static String padAtEnd(String string, int minLength, char padChar) {
return Strings.padEnd(string, minLength, padChar);
}
/**
* Returns a string consisting of a specific number of concatenated copies of an input string. For
* example, {@code repeat("hey", 3)} returns the string {@code "heyheyhey"}.
*
* @param string any non-null string
* @param count the number of times to repeat it; a nonnegative integer
* @return a string containing {@code string} repeated {@code count} times (the empty string if
* {@code count} is zero)
* @throws IllegalArgumentException if {@code count} is negative
*/
public static String repeat(String string, int count) {
return Strings.repeat(string, count);
}
/**
* This String util method removes single or double quotes
* from a string if its quoted.
* for input string = "mystr1" output will be = mystr1
* for input string = 'mystr2' output will be = mystr2
*
* @param string value to be unquoted.
* @return value unquoted, null if input is null.
*
*/
public static String unquote(String string) {
if (string != null && ((string.startsWith("\"") && string.endsWith("\""))
|| (string.startsWith("'") && string.endsWith("'")))) {
string = string.substring(1, string.length() - 1);
}
return string;
}
}