You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem or challenge?
StringView provides us a way to directly modify views of an array instead of generating a new StringArray when it comes to string operations like substr, which was done in #12044. I think we can play a similar trick in trim.
Describe the solution you'd like
I've looked into the implementation of general_trim, it uses the str::trim_xxx_matches methods the obtain the "substring". Furthermore, inside the str::trim_xxx_matches method, it first computes the [start, end) boundary and slices the str. The index here is useful for modifying views. Unfortunately, currently the feature Pattern it uses is unstable.
Describe alternatives you've considered
I'm not very sure what alternatives we have. Perhaps either implement our own trim or wait until Pattern is stable in Rust.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem or challenge?
StringView provides us a way to directly modify views of an array instead of generating a new StringArray when it comes to string operations like
substr
, which was done in #12044. I think we can play a similar trick intrim
.Describe the solution you'd like
I've looked into the implementation of
general_trim
, it uses thestr::trim_xxx_matches
methods the obtain the "substring". Furthermore, inside thestr::trim_xxx_matches
method, it first computes the[start, end)
boundary and slices thestr
. The index here is useful for modifying views. Unfortunately, currently the featurePattern
it uses isunstable
.Describe alternatives you've considered
I'm not very sure what alternatives we have. Perhaps either implement our own
trim
or wait untilPattern
is stable in Rust.Additional context
No response
The text was updated successfully, but these errors were encountered: