com.perforce.p4java.impl.mapbased.rpc.func.helper
Class StringHelper

java.lang.Object
  extended by com.perforce.p4java.impl.mapbased.rpc.func.helper.StringHelper

public class StringHelper
extends Object

Mildly-useful String and String-related helper methods that should probably be factored out elsewhere...


Constructor Summary
StringHelper()
           
 
Method Summary
static 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringHelper

public StringHelper()
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.


getRandomHexString

public static 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.



Copyright © 2015 Perforce Software. All Rights Reserved.