From 377edcffb4111f4c792cf56ebccd8fbfa18dd8e4 Mon Sep 17 00:00:00 2001 From: lxsang Date: Mon, 22 Jun 2020 12:58:10 +0200 Subject: [PATCH] fix API overriden bug --- src/core/core.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/core.ts b/src/core/core.ts index 54b2992..d463749 100644 --- a/src/core/core.ts +++ b/src/core/core.ts @@ -136,7 +136,7 @@ interface String { * @returns {string} * @memberof String */ - trimLeft(arg: string): string; + trimFromLeft(arg: string): string; /** * Trim right of a string by a mask string @@ -145,7 +145,7 @@ interface String { * @returns {string} * @memberof String */ - trimRight(arg: string): string; + trimFromRight(arg: string): string; /** * Trim both left and right of a string by a mask string @@ -706,19 +706,19 @@ namespace OS { } return API.lang[this]; }; - String.prototype.trimLeft = function(charlist: string): string { + String.prototype.trimFromLeft = function(charlist: string): string { if (charlist === undefined) charlist = "s"; return this.replace(new RegExp("^[" + charlist + "]+"), "") as string; }; - String.prototype.trimRight = function(charlist: string): string { + String.prototype.trimFromRight = function(charlist: string): string { if (charlist === undefined) charlist = "s"; return this.replace(new RegExp("[" + charlist + "]+$"), "") as string; }; String.prototype.trimBy = function(charlist: string): string { - return this.trimLeft(charlist).trimRight(charlist) as string; + return this.trimFromLeft(charlist).trimFromRight(charlist) as string; }; Date.prototype.toString = function(): string { let dd = this.getDate();