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
@Swatinem It is indeed a shortcoming. A PR supporting movePrependLeft, movePrependRight, moveAppendLeft, moveAppendRight would be welcome.
I imagine these methods could be implemented by making a copy of the substring to be moved, then calling remove and then the corresponding prependLeft, prependRight, appendLeft or appendRight methods. The move method could then be deprecated or removed.
Edit: After thinking about it, I realized that the algorithm outlined above would not work.
Consider the following example: (https://jsfiddle.net/0eojnd8f/1/)
I want to group all the As and Bs together, by moving the 2nd/3rd occurence after the first one. However this does not really work as intended.
The other way around, when I move the 1st/2nd before the 3rd one, things work:
This is a bit weird and unintuitive :-(
The text was updated successfully, but these errors were encountered: