[m-rev.] Minor addition to string.m

Simon Taylor stayl at cs.mu.OZ.AU
Wed Jan 29 16:00:30 AEDT 2003


On 29-Jan-2003, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Simon Taylor, Wednesday, 29 January 2003:
> > On 29-Jan-2003, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> > > Estimated hours taken: 0.5
> > > Branches: main
> > > 
> > > library/string.m:
> > > 	Added function chomp/1.
> > 
> > How about `remove_trailing_newline', or even better a more
> > general `remove_trailing_char'.
> 
> remove_trailing_char is a good idea; I'll add that.
> 
> chomp is pretty well known (it's a Perlism...).  How about if I add
> remove_trailing_newline as a synonym for chomp?  That should cover
> all the bases.

I don't think typing `remove_trailing_char(X, '\n')' is too onerous
(and I wouldn't expected it to be typed too often), so I'd leave
out `chomp' and `remove_trailing_newline' altogether.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list