public class Txt extends Object
Constructor and Description |
---|
Txt() |
Modifier and Type | Method and Description |
---|---|
private static String |
fdup(String f,
int pt,
int n)
fdup duplicates p or q formats for formatCheck
and the format() function.
|
static String |
formatCheck(String strFormat)
formatCheck checks p and q formats and duplicates if necessary
"%10.5p xxxx" ==> "%10.5p%10.5p%10.5p xxxx"
|
private static String |
formatString(String strFormat,
String key,
String strT,
float floatT,
double doubleT,
boolean doOne)
generic string formatter based on formatLabel in Atom
|
static String |
formatStringF(String strFormat,
String key,
float floatT) |
static String |
formatStringI(String strFormat,
String key,
int intT) |
static String |
formatStringS(String strFormat,
String key,
String strT) |
static int |
ichMathTerminator(String script,
int ichT,
int len)
For @{....}
|
static boolean |
isMatch(String s,
String strWildcard,
boolean checkStar,
boolean allowInitialStar) |
static boolean |
isWild(String s) |
static String |
join(String[] s,
char c,
int i0) |
static void |
leftJustify(javajs.util.SB s,
String s1,
String s2) |
static String |
replaceQuotedStrings(String s,
List<String> list,
List<String> newList) |
static String |
replaceStrings(String s,
List<String> list,
List<String> newList) |
static void |
rightJustify(javajs.util.SB s,
String s1,
String s2) |
static String |
safeTruncate(float f,
int n) |
static String |
sprintf(String strFormat,
String list,
Object[] values)
sprintf emulation uses (almost) c++ standard string formats 's' string 'i'
or 'd' integer 'f' float/decimal 'p' point3f 'q' quaternion/plane/axisangle
' with added "i" in addition to the insipid "d" (digits?)
|
public static String sprintf(String strFormat, String list, Object[] values)
strFormat
- list
- values
- private static String formatString(String strFormat, String key, String strT, float floatT, double doubleT, boolean doOne)
strFormat
- .... %width.precisionKEY....key
- any string to matchstrT
- replacement string or nullfloatT
- replacement float or Float.NaNdoubleT
- replacement double or Double.NaN -- for exponentialdoOne
- mimic sprintfpublic static String formatCheck(String strFormat)
strFormat
- private static String fdup(String f, int pt, int n)
f
- pt
- n
- public static String safeTruncate(float f, int n)
public static boolean isWild(String s)
public static boolean isMatch(String s, String strWildcard, boolean checkStar, boolean allowInitialStar)
public static String replaceQuotedStrings(String s, List<String> list, List<String> newList)
public static String replaceStrings(String s, List<String> list, List<String> newList)
public static int ichMathTerminator(String script, int ichT, int len)
script
- ichT
- len
-