public class StringFormatter extends Object
Constructor and Description |
---|
StringFormatter() |
Modifier and Type | Method and Description |
---|---|
static String |
checkIfDirEndsOnSlashAndRemove(String dir) |
static String |
convertStatDoubleToLatex(Stat s,
int decimals,
boolean includeSTDDeviation) |
static String |
convertStatDoubleToLatex(Stat s,
int decimals,
String before,
String after,
boolean includeSTDDeviation) |
static String |
convertStatPercentageToLatex(Stat s,
int decimals,
boolean addPercentSign,
boolean includeSTDDeviation) |
static String |
doubleRound(double d,
int decimals,
String before,
String after) |
static String |
doubleToPercent(double d)
formats a double value between 0 and 100 to a percentage
ex: 0.7854684 will be return 78.5%
|
static String |
doubleToPercent(double d,
int decimals) |
static String |
doubleToPercent(double d,
int decimals,
boolean addPercentSign) |
static boolean |
isWhitespace(String str) |
static void |
main(String[] args) |
static String |
myReplaceAll(String s,
char search,
String replacement)
used for regex difficult chars like _ or %
|
public StringFormatter()
public static String doubleToPercent(double d)
d
- the double valuepublic static String doubleToPercent(double d, int decimals)
public static String myReplaceAll(String s, char search, String replacement)
s
- search
- replacement
- public static String doubleToPercent(double d, int decimals, boolean addPercentSign)
public static String doubleRound(double d, int decimals, String before, String after)
public static String convertStatPercentageToLatex(Stat s, int decimals, boolean addPercentSign, boolean includeSTDDeviation)
public static String convertStatDoubleToLatex(Stat s, int decimals, boolean includeSTDDeviation)
public static String convertStatDoubleToLatex(Stat s, int decimals, String before, String after, boolean includeSTDDeviation)
public static boolean isWhitespace(String str)
public static String checkIfDirEndsOnSlashAndRemove(String dir)
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann