|
416 | 416 | must_be(chars, Chars),
|
417 | 417 | maplist(put_char(Stream), Chars).
|
418 | 418 |
|
419 |
| -%% char_stream(-Stream) |
| 419 | +%% chars_to_stream(-Stream) |
420 | 420 | % Stream is a character stream.
|
421 | 421 |
|
422 |
| -char_stream(Stream) :- |
| 422 | +char_to_stream(Stream) :- |
423 | 423 | '$memory_stream'(Stream).
|
424 | 424 |
|
425 |
| -%% char_stream(+Chars, -Stream) :- |
| 425 | +%% chars_to_stream(+Chars, -Stream) :- |
426 | 426 | % Convert a list of characters into a character stream.
|
427 | 427 |
|
428 |
| -char_stream(Chars, Stream) :- |
429 |
| - char_stream(Chars, Stream, []). |
| 428 | +chars_to_stream(Chars, Stream) :- |
| 429 | + chars_to_stream(Chars, Stream, []). |
430 | 430 |
|
431 |
| -%% char_stream(+Chars, -Stream, +Options) :- |
| 431 | +%% chars_to_stream(+Chars, -Stream, +Options) :- |
432 | 432 | % Creates a character stream from a list of characters.
|
433 | 433 | %
|
434 | 434 | % Chars is the list of characters to write to the stream.
|
|
438 | 438 | % Example:
|
439 | 439 | %
|
440 | 440 | % ```
|
441 |
| -% ?- char_stream("hello", Stream, []). |
| 441 | +% ?- chars_to_stream("hello", Stream, []). |
442 | 442 | % Stream = stream('$memory_stream'(2048)).
|
443 | 443 | % ```
|
444 | 444 |
|
445 |
| -char_stream(Chars, Stream, _) :- |
| 445 | +chars_to_stream(Chars, Stream, _) :- |
446 | 446 | must_be(chars, Chars),
|
447 | 447 | '$memory_stream'(Stream),
|
448 | 448 | put_chars(Stream, Chars).
|
0 commit comments