Class StringDisplayUtils
java.lang.Object
me.tongfei.progressbar.StringDisplayUtils
Contains methods to compute the display lengths of characters and strings on a terminal.
- Since:
- 0.9.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static intgetCharDisplayLength(char c) Returns the display width of a Unicode character on terminal.(package private) static intReturns the display width of a Unicode string on terminal.(package private) static StringtrimDisplayLength(String s, int maxDisplayLength)
-
Constructor Details
-
StringDisplayUtils
StringDisplayUtils()
-
-
Method Details
-
getCharDisplayLength
static int getCharDisplayLength(char c) Returns the display width of a Unicode character on terminal. -
getStringDisplayLength
Returns the display width of a Unicode string on terminal. -
trimDisplayLength
-