String slicing nomenclature
If you look at various string-manipulation libraries, tools, and programming languages, you will see a variety of different verbs used here, most of which are general and not location specific.
- remove — anywhere
- delete — anywhere
- strip — usually anywhere
- trim — usually on the two ends only: front/rear or left/right
- splice — either medial only, or anywhere
- chop, chomp — the rear end
Since there is little consensus here, you should probably just be explicit in your language:
s/^string//; # delete_from_front(), remove_leading()
s/string$//; # delete_from_end(), remove_trailing()
s/string//g; # delete_all(), remove_all()