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
String manipulation contains this section which is not very clear. Does pat refer to an exact string match, e.g. removing trim_end_match("foobar", "bar") would result in "foo", or does it support some pattern matching (as the variable name would imply)? I tried it with regex, but it seems like it is not working.
trim_end_match(s, pat) - Remove suffix of s matching pat.
trim_end_matches(s, pat) - Repeatedly remove suffixes of s matching pat.
trim_start_match(s, pat) - Remove prefix of s matching pat.
trim_start_matches(s, pat) - Repeatedly remove prefixes of s matching pat.
The text was updated successfully, but these errors were encountered:
String manipulation contains this section which is not very clear. Does
pat
refer to an exact string match, e.g. removingtrim_end_match("foobar", "bar")
would result in"foo"
, or does it support some pattern matching (as the variable name would imply)? I tried it with regex, but it seems like it is not working.The text was updated successfully, but these errors were encountered: