Class StringUtils
java.lang.Object
io.opentelemetry.instrumentation.api.internal.StringUtils
Internal string utilities.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendTruncated(StringBuilder target, String value, int maxLength) Appends the longest prefix ofvaluewhose length does not exceedmaxLength.static voidtruncate(StringBuffer value, int maxLength) Truncatesvalueso that its length does not exceedmaxLength.static voidtruncate(StringBuilder value, int maxLength) Truncatesvalueso that its length does not exceedmaxLength.static StringReturns the longest prefix whoseString.length()does not exceedmaxLength.
-
Method Details
-
truncate
Returns the longest prefix whoseString.length()does not exceedmaxLength. If truncating at the limit would split a surrogate pair, the pair is omitted. -
truncate
Truncatesvalueso that its length does not exceedmaxLength. If the limit would split a surrogate pair, the pair is omitted. -
truncate
Truncatesvalueso that its length does not exceedmaxLength. If the limit would split a surrogate pair, the pair is omitted. -
appendTruncated
Appends the longest prefix ofvaluewhose length does not exceedmaxLength. If the limit would split a surrogate pair, the pair is omitted.
-