Class RandomTextUtils

java.lang.Object
ca.uhn.fhir.jpa.util.RandomTextUtils

public class RandomTextUtils extends Object
  • Constructor Details

  • Method Details

    • newSecureRandomAlphaNumericString

      public static String newSecureRandomAlphaNumericString(int theLength)
      Creates a new string using randomly selected characters (using a secure random PRNG) containing letters (mixed case) and numbers.
    • findMatchingClosingBrace

      public static int findMatchingClosingBrace(int theStartIndex, String theStr)
      Finds the matching ")" for a "(" at the given starting index.
      Parameters:
      theStartIndex - the index of the "(" being matched
      theStr - the string to find matches in
      Returns:
      the index of the matching closing brace, or -1 if none found
    • findMatchingClosingBrace

      public static int findMatchingClosingBrace(int theStartIndex, String theStr, char theOpenBrace, char theClosingBrace)
      Finds the matching "closing" value given both the index of the "opening" value and what the value is. - If none found, it will return -1.