From 4274b90b1ef8e321bb6d41de7332e16f963d070d Mon Sep 17 00:00:00 2001 From: MaysWind Date: Wed, 12 Feb 2025 23:26:31 +0800 Subject: [PATCH] remove unused code --- src/lib/common.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/lib/common.ts b/src/lib/common.ts index 156661e3..3acf22b0 100644 --- a/src/lib/common.ts +++ b/src/lib/common.ts @@ -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)))); }