java.lang.Object
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 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

      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.

      Returns:
      hex string