Package io.smallrye.config.common.utils
Class StringUtil
- java.lang.Object
-
- io.smallrye.config.common.utils.StringUtil
-
public class StringUtil extends Object
- Author:
- Jeff Mesnil (c) 2017 Red Hat inc.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intindex(String name)static booleanisAsciiLetterOrDigit(char c)static booleanisInPath(String path, String name)Matches if a dotted property name is part of a dotted path.static booleanisNumeric(CharSequence digits)static booleanisNumeric(CharSequence digits, int begin, int end)static StringreplaceNonAlphanumericByUnderscores(String name)static StringreplaceNonAlphanumericByUnderscores(String name, StringBuilder sb)static Stringskewer(String camelHumps)static Stringskewer(String camelHumps, char separator)static String[]split(String text)static StringtoLowerCaseAndDotted(String name)static Stringunindexed(String name)static Stringunquoted(String name)static Stringunquoted(String name, int begin)static Stringunquoted(String name, int begin, int end)
-
-
-
Method Detail
-
isAsciiLetterOrDigit
public static boolean isAsciiLetterOrDigit(char c)
-
replaceNonAlphanumericByUnderscores
public static String replaceNonAlphanumericByUnderscores(String name)
-
replaceNonAlphanumericByUnderscores
public static String replaceNonAlphanumericByUnderscores(String name, StringBuilder sb)
-
isInPath
public static boolean isInPath(String path, String name)
Matches if a dotted property name is part of a dotted path.- Parameters:
path- the dotted pathname- a dotted property name- Returns:
trueif the dotted property name ir part of a dotted path, orfalseotherwise.
-
isNumeric
public static boolean isNumeric(CharSequence digits)
-
isNumeric
public static boolean isNumeric(CharSequence digits, int begin, int end)
-
index
public static int index(String name)
-
-