mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix code
This commit is contained in:
parent
b9f7e062bc
commit
75ec4a5cf6
@ -7,6 +7,7 @@ import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import cn.hutool.core.text.UnicodeUtil;
|
||||
import cn.hutool.core.util.ByteUtil;
|
||||
import cn.hutool.core.util.CharUtil;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.ClassUtil;
|
||||
import cn.hutool.core.util.HexUtil;
|
||||
@ -777,7 +778,7 @@ public class Convert {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c[i] == ' ') {
|
||||
if (c[i] == CharUtil.SPACE) {
|
||||
c[i] = '\u3000';
|
||||
} else if (c[i] < '\177') {
|
||||
c[i] = (char) (c[i] + 65248);
|
||||
|
@ -145,7 +145,7 @@ public class ConsoleTable {
|
||||
private void fillBorder(StringBuilder sb) {
|
||||
sb.append(CORNER);
|
||||
for (Integer width : columnCharNumber) {
|
||||
sb.append(Convert.toSBC(StrUtil.fillAfter("", ROW_LINE, width + 2)));
|
||||
sb.append(StrUtil.repeat(ROW_LINE, width + 2));
|
||||
sb.append(CORNER);
|
||||
}
|
||||
sb.append(LF);
|
||||
@ -158,4 +158,16 @@ public class ConsoleTable {
|
||||
Console.print(toString());
|
||||
}
|
||||
|
||||
private String fixLength(String input){
|
||||
int fixLength = 0;
|
||||
final int length = input.length();
|
||||
char c;
|
||||
for (int i = 0; i < length; i++) {
|
||||
c = input.charAt(i);
|
||||
if (c < '\177') {
|
||||
fixLength ++;
|
||||
}
|
||||
}
|
||||
return input + StrUtil.repeat('#', fixLength);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user