Do these words exist?
So here I am, trying to give a name to a function and I'm lost. I'm looking for a word that means 'to cut the end off' and a word 'to cut the front off'.
Posttruncate and Pretruncate work, but only sort of. Does english not have words for this? Do any other languages? Can anyone think of a better solution?
Cheers
@daerid: You're right, *Trim is much easier to read.
@Vlion: Prefix and Suffix mean to add to the front and back, respectively. I'm in search of words pertaining to removing.
Thanks
@Vlion: Prefix and Suffix mean to add to the front and back, respectively. I'm in search of words pertaining to removing.
Thanks
Well...being nit-picky, a prefix(noun) on a word is the starting ordered sequence of characters, of n length, not including the last.
to prefix(verb) is to put something on the front of.
And vice versa.
Nit-picking, I know, but ^_^.
to prefix(verb) is to put something on the front of.
And vice versa.
Nit-picking, I know, but ^_^.
Quote:Original post by aaron_dsIn which case, RemovePrefix and RemoveSuffix would work, no? Of course, the *Trim names are probably better since those seem to be the more standard names for such functions.
[...]@Vlion: Prefix and Suffix mean to add to the front and back, respectively. I'm in search of words pertaining to removing.
Thanks
TrimFromStartTo(A),TrimToEndFrom(B) looks ok, but too long.... and left and right might not be related to start and end of an array.
IMO, "truncate" usually means to chop something off the end. It technically could mean anywhere, but if you don't specify where its often assumed to be off the end. So truncate would be fine to chop stuff off the end.
As for the front, you could borrow Haskell list terminology and call it "drop". It "drops" the first n pieces, and "truncates" the last m pieces...
As for the front, you could borrow Haskell list terminology and call it "drop". It "drops" the first n pieces, and "truncates" the last m pieces...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement