Skip to content

Implement string.Trim with parameters on SQL Server #22927

@roji

Description

@roji

We currently translate string.Trim only when no characters are specified (whitespace only), and implement it with LTRIM/RTRIM.

SQL Server 2017 introduced a more fully-featured TRIM function which can accept characters to trim. To maintain compatibility with older versions we can still use this only when non-whitespace characters are specified. Unfortunately no similar overloads exist for LTRIM/RTRIM (#22924).

Note that TRIM has a funky syntax (TRIM ( [ characters FROM ] string )), instead of just commas.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions