Rmtrail.C script Publisher Review:
Rmtrail.C Rmtrail.C
Rmtrail.C Remove trailing whitespace from a stringNote: This can arguably be made better by eliminating the strlen() call and its attendant overhead, or by recoding it operate in a single pass rather than the "go to the end, then back up" algorithm used here. An example is in SNIPPETS - see NOTRAIL.C. Hoever, a couple of points should be mentioned: 1. A library strlen() is often coded in assembly and, even with the call overhead, may be faster than the same functionality written in C.2. Furthermore, the algorithm in NOTRAIL.C has to potentially examine every character in a string twice (once to compare to NUL, the other to test for whitespace). That it does this in one pass or two is immaterial. By using the two pass approach here, we can take potential advantage of strlen to check for NUL's, then explicitly only test backwards from the end looking for whitespace. For non-trivial strings (i.e. mostly text with a few spaces at the end), this may well be faster. 3. If the potential increase in performance is really *that* important, the most sensible improvement would be o rewite it in assembly.4. The additional algorithmic complexity of the improvements in NOTRAIL.C may arguably decrease maintainability. By contrast, the algorithm here is quite obvious.Rmtrail.C script details and screenshot
RECOMMENDED TOOLS
Related tags:
Related downloads
Java Mixins with code generation script
Java Mixins with code generation Java Mixins with code generation - Ruby style mixin in Ja
Price: Freeware$, Rating: 6, Downloads: 0
Java Mixins with code generation Java Mixins with code generation - Ruby style mixin in Ja
Price: Freeware$, Rating: 6, Downloads: 0
Image info from blogging.rb script
Image info from blogging.rb Image info from blogging.rb - extract image info from blogging
Price: Freeware$, Rating: 7, Downloads: 0
Image info from blogging.rb Image info from blogging.rb - extract image info from blogging
Price: Freeware$, Rating: 7, Downloads: 0
Content Negotiation script
Content Negotiation Content Negotiation - Serve XHTML as application/xhtml xml to browsers
Price: Freeware$, Rating: 8, Downloads: 0
Content Negotiation Content Negotiation - Serve XHTML as application/xhtml xml to browsers
Price: Freeware$, Rating: 8, Downloads: 0
active record class script
active record class active record class - iterate through each child association of a acti
Price: Freeware$, Rating: 7, Downloads: 0
active record class active record class - iterate through each child association of a acti
Price: Freeware$, Rating: 7, Downloads: 0
useful pear html template it script
useful pear html template it script useful pear html template it script allows you to show
Price: Freeware$, Rating: 6, Downloads: 0
useful pear html template it script useful pear html template it script allows you to show
Price: Freeware$, Rating: 6, Downloads: 0
MovieClip.RandomMask script
MovieClip.RandomMask MovieClip.RandomMask - Random Mask & Remove Mask prototypes
Price: Freeware$, Rating: 8, Downloads: 0
MovieClip.RandomMask MovieClip.RandomMask - Random Mask & Remove Mask prototypes
Price: Freeware$, Rating: 8, Downloads: 0
all_children! script
all_children! all_children! gives you all the children of a model that acts_as_tree
Price: Freeware$, Rating: 10, Downloads: 0
all_children! all_children! gives you all the children of a model that acts_as_tree
Price: Freeware$, Rating: 10, Downloads: 0
get current filename as variable script
get current filename as variable get current filename as variable script allows you to get
Price: GPL$, Rating: 10, Downloads: 0
get current filename as variable get current filename as variable script allows you to get
Price: GPL$, Rating: 10, Downloads: 0
