Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Feb 12, 2025
1 parent 0b57216 commit 4274b90
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/lib/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,35 +223,6 @@ export function limitText(value: string, maxLength: number): string {
return value.substring(0, maxLength - 3) + '...';
}

export function getTextBefore(fullText: string, text: string): string {
if (!text) {
return fullText;
}

const index = fullText.indexOf(text);

if (index >= 0) {
return fullText.substring(0, index);
}

return '';
}

export function getTextAfter(fullText: string, text: string): string {
if (!text) {
return fullText;
}

let index = fullText.indexOf(text);

if (index >= 0) {
index += text.length;
return fullText.substring(index);
}

return '';
}

export function base64encode(arrayBuffer: ArrayBuffer): string {
return btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(arrayBuffer))));
}
Expand Down

0 comments on commit 4274b90

Please sign in to comment.