Closed heroesleo65 closed 3 years ago
StringDisplayUtils.trimDisplayLength(str, max_display_len) to select string with minimal of total display length this str and given max_display_len. I mean that calculate display length of string is unnecessary. This idea is using in InteractiveConsoleProgressBarConsumer (https://github.com/ctongfei/progressbar/blob/4f86bc3b7d71071fac7a03dd05d7d00a092779cf/src/main/java/me/tongfei/progressbar/InteractiveConsoleProgressBarConsumer.java#L27)
Yeah you are right. The code is completely redundant. Thanks!
StringDisplayUtils.trimDisplayLength(str, max_display_len) to select string with minimal of total display length this str and given max_display_len. I mean that calculate display length of string is unnecessary. This idea is using in InteractiveConsoleProgressBarConsumer (https://github.com/ctongfei/progressbar/blob/4f86bc3b7d71071fac7a03dd05d7d00a092779cf/src/main/java/me/tongfei/progressbar/InteractiveConsoleProgressBarConsumer.java#L27)