How do I intercept a set of data when it needs to be removed from a group to meet the criteria?
Basic ideas:
① it through a specific symbol, a set of strings splicing, or with "," or "+", all the strings are stitched together, such as the following format "+aa+bb+cc+dd+ee+ff+"
② then needs to intercept the "EE" from the string above, judging the position of "+ee+" in the string, and then intercepting it, getting "+aa+bb+cc+dd" and "ff+"
③ two strings to be truncated with a "+" stitching.
④ after stitching to re-assign the value of the time needed to restore the string to the original state, that is, the removal of the string two "+", Return to "Aa+bb+cc+dd+ff", so as to facilitate the next operation, continue to add "+" in the first and last position, Otherwise, no subsequent edits will be possible without conforming to the next string format
It is also to be considered how to judge the initial string if it is empty
This is the whole idea.
The interception of strings in JS