Package io.micronaut.openapi.visitor
Class StringUtil
java.lang.Object
io.micronaut.openapi.visitor.StringUtil
String utilities.
- Since:
- 6.7.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final char
static final String
static final String
static final String
-
Method Summary
-
Field Details
-
PLACEHOLDER_PREFIX
- See Also:
-
PLACEHOLDER_POSTFIX
- See Also:
-
THREE_DOTS
- See Also:
-
OPEN_BRACE
- See Also:
-
CLOSE_BRACE
- See Also:
-
SLASH
- See Also:
-
SLASH_CHAR
public static final char SLASH_CHAR- See Also:
-
DOLLAR
- See Also:
-
DOT
- See Also:
-
COMMA
- See Also:
-
UNDERSCORE
- See Also:
-
MINUS
- See Also:
-
WILDCARD
- See Also:
-
QUOTE
- See Also:
-
KEY_VALUE_SEPARATOR
- See Also:
-
COMMA_NEW_LINE
- See Also:
-
-
Method Details
-
capitalizedPathVar
Return string with first capitalized letter and without braces.- Parameters:
value
- path variable name with braces- Returns:
- capitalized path var name without braces
-
left
Gets the leftmostlen
characters of a String.If
len
characters are not available, or the String isnull
, the String will be returned without an exception. An empty String is returned if len is negative.StringUtil.left(null, *) = null StringUtil.left(*, -ve) = "" StringUtil.left("", *) = "" StringUtil.left("abc", 0) = "" StringUtil.left("abc", 2) = "ab" StringUtil.left("abc", 4) = "abc"
- Parameters:
str
- the String to get the leftmost characters from, may be nulllen
- the length of the required String- Returns:
- the leftmost characters,
null
if null String input
-