Sign in to follow this  

Do these words exist?

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
@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

Share this post


Link to post
Share on other sites
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 ^_^.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this