Class StringHelper
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.rpc.func.helper.StringHelper
-
public class StringHelper extends java.lang.Object
Mildly-useful String and String-related helper methods that should probably be factored out elsewhere...
-
-
Constructor Summary
Constructors Constructor Description StringHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getRandomHexString()
Return a plausibly-random number string in hex form.static int
hexcharToInt(char c)
Return the integer value of the passed-in char interpreted as a hex digit.
-
-
-
Method Detail
-
hexcharToInt
public static int hexcharToInt(char c)
Return the integer value of the passed-in char interpreted as a hex digit. FIXME: return -1 on bad conversion -- HR.- Parameters:
c
- char- Returns:
- integer value
-
getRandomHexString
public static java.lang.String getRandomHexString()
Return a plausibly-random number string in hex form. Used mostly for temp filename generation.Not (yet) synchronised as unlikely to be problem with threads and contention.
- Returns:
- hex string
-
-