Package org.apache.pinot.common.utils
Class StringUtil
- java.lang.Object
-
- org.apache.pinot.common.utils.StringUtil
-
public class StringUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringjoin(String separator, String... keys)Joins the given keys with the separator.static StringsanitizeStringValue(String value, int maxLength)Sanitizes a string value.
-
-
-
Method Detail
-
join
public static String join(String separator, String... keys)
Joins the given keys with the separator.
-
sanitizeStringValue
public static String sanitizeStringValue(String value, int maxLength)
Sanitizes a string value.- Truncate characters after the first
nullcharacter as it is reserved as the padding character - Limit the length of the string
- Parameters:
value- String value to sanitizemaxLength- Max number of characters allowed- Returns:
- Modified value, or value itself if not modified
- Truncate characters after the first
-
-