Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 8adce33

Browse files
author
soliury
committed
remove dead code
1 parent f0b9356 commit 8adce33

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/utils/index.js

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,35 +40,3 @@ export function link(url) {
4040
console.error('An error occurred', err);
4141
})
4242
}
43-
44-
export function substring(str, start, end) {
45-
let result = '';
46-
let i = 0;
47-
while (i < end) {
48-
let c = str.charCodeAt(i);
49-
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
50-
result += str[i];
51-
}
52-
else {
53-
end -= 1;
54-
result += str[i];
55-
}
56-
i++;
57-
}
58-
return result;
59-
}
60-
61-
62-
export function strlen(str) {
63-
let len = 0;
64-
for (let i = 0; i < str.length; i++) {
65-
const c = str.charCodeAt(i);
66-
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
67-
len++;
68-
}
69-
else {
70-
len += 2;
71-
}
72-
}
73-
return len;
74-
}

0 commit comments

Comments
 (0)