com.github.podal.codejavadoc.util.StringUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codejavadoc Show documentation
Show all versions of codejavadoc Show documentation
Tool for copying java code to javadoc
The newest version!
package com.github.podal.codejavadoc.util;
import java.util.Arrays;
public class StringUtil {
private StringUtil() {
}
public static String cutLast(String fileName, char ch) {
return fileName.substring(0, fileName.lastIndexOf(ch));
}
public static String padLeft(String string, char c, int len) {
char[] chs = new char[len];
Arrays.fill(chs, c);
String string2 = new String(chs) + string;
return string2.substring(string2.length() - len);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy