Jump to content
  • Advertisement
Sign in to follow this  
aaron_ds

Do these words exist?

This topic is 5125 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
Advertisement
@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
TrimFromStartTo(A),TrimToEndFrom(B) looks ok, but too long.... and left and right might not be related to start and end of an array.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!