![]() |
|
Navigation |
Synopsis Convert a set to a string.
Function
str toString(set[&T] st)
Usage
import Set;
Examples
rascal>import Set; ok 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.
Questions
Question [1].
![]() ![]()
Question [2].
![]() ![]() ![]() |