This website works better with JavaScript.
Home
Explore
帮助
返回水杉在线
登录水杉在线
登录水杉码园
wlxsp
/
test1
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Adds extra length check for perf
main
Eric Amodio
2 years ago
parent
b575a2c7b0
commit
023011bdbe
1 changed files
with
2 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
src/system/string.ts
+ 2
- 0
src/system/string.ts
View File
@ -405,6 +405,8 @@ export function getWidth(s: string): number {
}
s
=
s
.
replace
(
cachedAnsiRegex
,
''
)
;
if
(
s
.
length
===
0
)
return
0
;
let
count
=
0
;
let
emoji
=
0
;
let
joiners
=
0
;
Write
Preview
Loading…
Cancel
Save