org.jamel.dbf.utils.StringUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbf-reader Show documentation
Show all versions of dbf-reader Show documentation
Java library for fast reading DBF-files
package org.jamel.dbf.utils;
/**
* @author Sergey Polovko
*/
public class StringUtils {
public static String rightPad(String str, int size, char padChar) {
// returns original string when possible
if (str.length() >= size) return str;
StringBuilder sb = new StringBuilder(size + 1).append(str);
while (sb.length() < size) {
sb.append(padChar);
}
return sb.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy