[m-dev.] for review: destructive changes to string.m

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Nov 12 00:55:01 AEDT 2000


On 11-Nov-2000, Michael Day <mikeday at corplink.com.au> wrote:
> 
> Allows checking string length without losing uniqueness and adds
> predicates to allow changing arbitrary characters in a string, handy for
> implementation of string streams.
>  
> library/string.m:
> 	Added a new mode definition to string__length/2 using unique input
> 	so as not to destroy uniqueness when checking string length.
> 
> 	Added three new predicates, string__set_char, set_char_det and 
> 	unsafe_set_char that allow changing arbitrary characters in a
> 	string. These function similarly to the corresponding index,
> 	index_det and unsafe_index predicates.
> 
> 	Also changes index implementation to use MR_Unsigned not MR_Word.

That looks great.

It would be nice to add a comment about the missing `ui' mode for
string__length/1, but apart from that, I can't see any problems.
So, unless anyone else has any objections, please go ahead and commit
this change.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list