Do these words exist?

Started by
10 comments, last by DaemonMagus 19 years, 7 months ago
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
Advertisement
LeftTrim and RightTrim not good enough?
daerid@gmail.com
Prefix. Suffix.
~V'lionBugle4d
@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
All I can say is LOL. It must be late for you too. [wink]
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
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 ^_^.
~V'lionBugle4d
Quote:Original post by aaron_ds
[...]@Vlion: Prefix and Suffix mean to add to the front and back, respectively. I'm in search of words pertaining to removing.
Thanks
In 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.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
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...
My stuff.Shameless promotion: FreePop: The GPL god-sim.
In unix it's called 'head' and 'tail' =)

This topic is closed to new replies.

Advertisement