/******************************************************************** * @author: Kaven * @email: kaven@wuwenkai.com * @website: http://blog.kaven.xyz * @file: [Kaven-Basic] /src/libs/string/TrimStart.ts * @create: 2025-06-25 16:52:15.671 * @modify: 2026-03-12 14:06:06.019 * @version: 6.1.1 * @times: 10 * @lines: 129 * @copyright: Copyright © 2018-2026 Kaven. All Rights Reserved. * @description: [description] * @license: * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. ********************************************************************/ /** * Removes the specified substring from the start of the given string, if present. * * @param input - The input string to trim. * @param target - The substring to remove from the start of `input`. * @returns The resulting string after removing `target` from the start, or the original string if it does not start with `target`. * * @remarks This function will remove all occurrences until it no longer starts with `target`. * * @since 3.0.3 * @version 2025-06-25 */ export declare function TrimStart(input: string, target: string): string; /** * Removes up to a specified number of occurrences of a target substring from the start of the input string. * * @param input - The string to trim from the start. * @param target - The substring to remove from the start of the input string. * @param max - The maximum number of times to remove the target substring. * @returns The resulting string after removing the target substring up to the specified maximum number of times. * * @since 3.0.3 * @version 2025-06-25 */ export declare function TrimStart(input: string, target: string, max: number): string; /** * Removes all occurrences of the specified target substrings from the start of the input string. * * @param input - The string to trim. * @param targets - An array of substrings to remove from the start of the input string. * @returns The trimmed string with all specified targets removed from the start. * * @remarks This function will repeatedly trim all occurrences of the target substrings from the start until no more can be trimmed. * * @since 3.0.3 * @version 2025-06-25 */ export declare function TrimStart(input: string, targets: string[]): string; /** * Removes the specified target substrings from the start of the input string. * * @param input - The string to trim. * @param targets - An array of substrings to remove from the start of the input. * @param trimAll - If `true`, repeatedly removes all occurrences of the target substrings from the start; * if `false`, removes only the first occurrence of any target substring. * @returns The trimmed string. * * @since 3.0.3 * @version 2026-03-12 */ export declare function TrimStart(input: string, targets: string[], trimAll: boolean): string; //# sourceMappingURL=TrimStart.d.ts.map