86.12 IntListToString

IntListToString( part, [brackets] )

part must be a list of positive integers. If all of them are smaller than 10 then a string of digits corresponding to the entries of part is returned. If an entry is geq 10 then the elements of part are converted to strings, concatenated with separating commas and the result surrounded by brackets. By default () brackets are used. This may be changed by giving as second argument a length two string specifying another kind of brackets.

    gap> IntListToString( [ 4, 2, 2, 1, 1 ] );
    "42211"
    gap> IntListToString( [ 14, 2, 2, 1, 1 ] );
    "(14,2,2,1,1)"
    gap> IntListToString( [ 14, 2, 2, 1, 1 ], "{}" );
    "{14,2,2,1,1}" 

Previous Up Top Next
Index

GAP 3.4.4
April 1997