Package me.tongfei.progressbar
Class StringDisplayUtils
- java.lang.Object
-
- me.tongfei.progressbar.StringDisplayUtils
-
class StringDisplayUtils extends java.lang.ObjectContains methods to compute the display lengths of characters and strings on a terminal.- Since:
- 0.9.1
-
-
Constructor Summary
Constructors Constructor Description StringDisplayUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static intgetCharDisplayLength(char c)Returns the display width of a Unicode character on terminal.(package private) static intgetStringDisplayLength(java.lang.String s)Returns the display width of a Unicode string on terminal.(package private) static java.lang.StringtrimDisplayLength(java.lang.String s, int maxDisplayLength)
-
-
-
Method Detail
-
getCharDisplayLength
static int getCharDisplayLength(char c)
Returns the display width of a Unicode character on terminal.
-
getStringDisplayLength
static int getStringDisplayLength(java.lang.String s)
Returns the display width of a Unicode string on terminal.
-
trimDisplayLength
static java.lang.String trimDisplayLength(java.lang.String s, int maxDisplayLength)
-
-