I have taken a look at the remove_last_word method.
It should work in all cases that way https://paste.debian.net/plain/333745
Jfyi, regarding "space_index = -1 == space_index ? 0 : space_index+1;". You can't simply do "space_index+1" since this might not be a valid byte-position in this utf8 string.
« Back to merge proposal
I have taken a look at the remove_last_word method.
It should work in all cases that way /paste. debian. net/plain/ 333745
https:/
Jfyi, regarding "space_index = -1 == space_index ? 0 : space_index+1;". You can't simply do "space_index+1" since this might not be a valid byte-position in this utf8 string.