Class StringHelper
java.lang.Object
com.marginallyclever.convenience.helpers.StringHelper
A collection of static methods to help with strings.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
byteArrayToFloat
(byte[] bytes) static boolean
confirmChecksumOK
(String msg) static byte[]
floatToByteArray
(double value) static String
formatDouble
(double arg0) static String
formatTime
(double seconds) static String
generateChecksum
(String msg) static javax.vecmath.Matrix3d
static javax.vecmath.Matrix4d
static javax.vecmath.Tuple3d
static String
printTuple3d
(javax.vecmath.Vector3d zAxis) static String
-
Constructor Details
-
StringHelper
public StringHelper()
-
-
Method Details
-
shortenNumber
-
formatDouble
-
generateChecksum
-
confirmChecksumOK
-
floatToByteArray
public static byte[] floatToByteArray(double value) - Parameters:
value
-- Returns:
- byte array
-
byteArrayToFloat
public static double byteArrayToFloat(byte[] bytes) - Parameters:
bytes
- byte array- Returns:
- double value
-
formatTime
- Parameters:
seconds
- time in seconds- Returns:
- formatted string
-
parseTuple3d
- Throws:
IOException
-
parseMatrix3d
- Throws:
Exception
-
parseMatrix4d
- Throws:
Exception
-
printTuple3d
-