kaven-basic - v6.0.0
    Preparing search index...

    Function TrimStart

    • Removes the specified substring from the start of the given string, if present.

      Parameters

      • input: string

        The input string to trim.

      • target: string

        The substring to remove from the start of input.

      Returns string

      The resulting string after removing target from the start, or the original string if it does not start with target.

      This function will remove all occurrences until it no longer starts with target.

      3.0.3

      2025-06-25

    • Removes up to a specified number of occurrences of a target substring from the start of the input string.

      Parameters

      • input: string

        The string to trim from the start.

      • target: string

        The substring to remove from the start of the input string.

      • max: number

        The maximum number of times to remove the target substring.

      Returns string

      The resulting string after removing the target substring up to the specified maximum number of times.

      3.0.3

      2025-06-25

    • Removes all occurrences of the specified target substrings from the start of the input string.

      Parameters

      • input: string

        The string to trim.

      • targets: string[]

        An array of substrings to remove from the start of the input string.

      Returns string

      The trimmed string with all specified targets removed from the start.

      This function will repeatedly trim all occurrences of the target substrings from the start until no more can be trimmed.

      3.0.3

      2025-06-25

    • Removes the specified target substrings from the start of the input string.

      Parameters

      • input: string

        The string to trim.

      • targets: string[]

        An array of substrings to remove from the start of the input.

      • trimAll: boolean

        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 string

      The trimmed string.

      3.0.3

      2025-06-25