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
The result of stringr::str_replace_all("abcd", pattern = c("a" = "d", "d" = "x")) is "xbcx". That means, patterns are replaced one after the other: 'a' first becomes 'd' and in second round 'd' becomes 'x'. So, 'a' becomes 'x'.
What do I have to do to get "dbcx" as result?
I expect it is not possible with stringr::str_replace_all. But, is there another function to do it and if not, is the behaviour I desire too weird to be covered by stringr::str_replace_all?
The text was updated successfully, but these errors were encountered:
The result of
stringr::str_replace_all("abcd", pattern = c("a" = "d", "d" = "x"))
is "xbcx". That means, patterns are replaced one after the other: 'a' first becomes 'd' and in second round 'd' becomes 'x'. So, 'a' becomes 'x'.What do I have to do to get "dbcx" as result?
I expect it is not possible with stringr::str_replace_all. But, is there another function to do it and if not, is the behaviour I desire too weird to be covered by stringr::str_replace_all?
The text was updated successfully, but these errors were encountered: