[m-rev.] for review: move string builder stream to standard library
Peter Wang
wangp at students.csse.unimelb.edu.au
Thu Apr 19 17:29:11 AEST 2007
On 2007-04-19, Ian MacLarty <maclarty at csse.unimelb.edu.au> wrote:
> For review by anyone.
>
> Estimated hours taken: 0.5
> Branches: main.
>
> Move the string builder stream from extras to the standard library.
>
> library/string.builder.m:
> Move stream_util.string_builder to string.builder.
>
> Use builtin.copy instead of unsafe_promise_unique in the implementation
> of put/4 for the string builder stream.
>
> library/string.m:
> Include string.builder.
>
> tests/hard_coded/Mmakefile:
> tests/hard_coded/string_builder_test.exp:
> tests/hard_coded/string_builder_test.m:
> Add a test case.
> +
> +string_builder_state_to_string(State) = String :-
> + State = string_builder_state(StringList),
> + String = string.join_list("", list.reverse(StringList)).
You can use string.append_list here.
You also need to add it to the NEWS file.
Peter
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list