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

    Function TrimEnd

    • Removes the specified target substring from the end of the input string, if present.

      Parameters

      • input: string

        The original string to trim.

      • target: string

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

      Returns string

      The trimmed string with the target removed from the end, if it was present.

      This function will remove all occurrences of the target substring from the end until it no longer ends with the target.

      3.0.3

      2025-06-25

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

      Parameters

      • input: string

        The original string to trim.

      • target: string

        The substring to remove from the end of the input.

      • max: number

        The maximum number of times to remove the target substring.

      Returns string

      The trimmed string with up to max occurrences of target removed from the end.

      3.0.3

      2025-06-25

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

      Parameters

      • input: string

        The original string to trim.

      • targets: string[]

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

      Returns string

      The trimmed string with all specified target substrings removed from the end.

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

      3.0.3

      2025-06-25

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

      Parameters

      • input: string

        The string to trim.

      • targets: string[]

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

      • trimAll: boolean

        If true, repeatedly trims all occurrences of the target substrings from the end; if false, trims only one occurrence.

      Returns string

      The trimmed string.

      3.0.3

      2025-06-25