Class StringHelper
java.lang.Object
com.perforce.p4java.impl.mapbased.rpc.func.helper.StringHelper
Mildly-useful String and String-related helper methods that
should probably be factored out elsewhere...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn a plausibly-random number string in hex form.static inthexcharToInt(char c) Return the integer value of the passed-in char interpreted as a hex digit.
-
Constructor Details
-
StringHelper
public StringHelper()
-
-
Method Details
-
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
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
-