
Package ca.uhn.fhir.jpa.util
Class RandomTextUtils
java.lang.Object
ca.uhn.fhir.jpa.util.RandomTextUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
findMatchingClosingBrace
(int theStartIndex, String theStr) Finds the matching ")" for a "(" at the given starting index.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 isstatic String
newSecureRandomAlphaNumericString
(int theLength) Creates a new string using randomly selected characters (using a secure random PRNG) containing letters (mixed case) and numbers.
-
Constructor Details
-
RandomTextUtils
public RandomTextUtils()
-
-
Method Details
-
newSecureRandomAlphaNumericString
Creates a new string using randomly selected characters (using a secure random PRNG) containing letters (mixed case) and numbers. -
findMatchingClosingBrace
Finds the matching ")" for a "(" at the given starting index.- Parameters:
theStartIndex
- the index of the "(" being matchedtheStr
- 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.
-