public class StringUtils extends Object
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
ensureBraces(String value)
If the given string is surrounded by curly braces, return it intact, otherwise trim it and
surround it with curly braces.
|
static String |
ensureBrackets(String value)
If the given string is surrounded by square brackets, return it intact, otherwise trim it and
surround it with square brackets.
|
static String |
ensureQuoted(String value)
If the given string is surrounded by double-quotes, return it intact, otherwise trim it and
surround it with double-quotes.
|
static String |
nCopies(String s,
int count)
Returns a new string consisting of n copies of the given string.
|
public static String ensureBrackets(String value)
value - The string to check.public static String ensureBraces(String value)
value - The string to check.public static String ensureQuoted(String value)
value - The string to check.Copyright © 2017–2021 DataStax. All rights reserved.