| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
(make-string 5 #\x) => "xxxxx" |
Note that the algorithm to allocate a string by make-string and
then fills it one character at a time is extremely inefficient
in Gauche, and should be avoided. That kind of algorithms unnecessarily
assumes underlying string allocation and representation mechanism,
which Gauche doesn't follow.
You can use an output string port for a string construction
(See section 6.18.4 String ports).
Even creating a list of characters and
using list->string is faster than using make-string and
string-set!.
number->string, symbols are
converted by symbol->string, and other objects are
converted by display.
Other class may provide a method to customize the behavior.