Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/0opslab/opslabJutil
/ full2Half
Method
full2Half
src/main/java/com/opslab/util/StringUtil.java:292–297 ·
view source on GitHub ↗
全角字符变半角字符 @param str 需要处理的字符串 @return 处理后的字符串
(String str)
Source
from the content-addressed store, hash-verified
290
* @
return
处理后的字符串
291
*/
292
public
static
String full2Half(String str) {
293
if
(isEmpty(str)) {
294
return
""
;
295
}
296
return
BCConvert.qj2bj(str);
297
}
298
299
/**
300
* 半角字符变全角字符
Callers
1
testBracketStr
Method · 0.95
Calls
2
isEmpty
Method · 0.95
qj2bj
Method · 0.95
Tested by
1
testBracketStr
Method · 0.76