Synopsis Convert a set to an indented string.
Function str itoString(set[&T] st)
Usage import Set;
rascal>import Set;
rascal>toString({1, 2, 3});
str: "{1,2,3}"
rascal>toString({"elephant", "zebra", "snake"});
str: "{\"snake\",\"zebra\",\"elephant\"}"
Pitfalls Recall that the elements of a set are unordered and that there is no guarantee in which order the set elements will be placed in the resulting string.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit