StrUtil.isBlank增加\u200c判断(issue#3903@Github)

This commit is contained in:
Looly 2025-03-24 08:51:18 +08:00
parent c1d11a52a5
commit 4affc832d6
2 changed files with 8 additions and 1 deletions

View File

@ -278,6 +278,8 @@ public class CharUtil implements CharPool {
|| c == '\u3164'
// Braille Pattern Blank
|| c == '\u2800'
// Zero Width Non-Joiner, ZWNJ
|| c == '\u200c'
// MONGOLIAN VOWEL SEPARATOR
|| c == '\u180e';
}

View File

@ -19,6 +19,8 @@ package org.dromara.hutool.core.text;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class CharUtilTest {
@Test
@ -56,7 +58,10 @@ public class CharUtilTest {
Assertions.assertTrue(CharUtil.isBlankChar(a3));
final char a4 = '\u0000';
Assertions.assertTrue(CharUtil.isBlankChar(a4));
assertTrue(CharUtil.isBlankChar(a4));
final char a6 = '\u200c';
assertTrue(CharUtil.isBlankChar(a6));
}
@Test