List2str function

53 views
Skip to first unread message

Clement

unread,
May 20, 2025, 4:07:38 AM5/20/25
to The Ring Programming Language
An integer list of 10 elements once converted to string will have 20 in  length:

1 + nl
2 + nl
3 + nl
and so on... 

How to remove those nl, so to be exact 10 elements and can print out the string in one row format like 12345678910


aList = 1:10

strList = list2str(aList)

put(len(strList))       # Length returns 20 with those nl added










calm...@gmail.com

unread,
May 20, 2025, 12:31:49 PM5/20/25
to The Ring Programming Language
Hello Mahmoud at All,

Probable this is good:

aList = 1:10

strList = list2str(aList)

strList = substr(strList,nl,"")

put strList


Output:


12345678910


Greetings,

Gal Zsolt

Clement

unread,
May 20, 2025, 9:31:31 PM5/20/25
to The Ring Programming Language
Thanks Gal, problem solved!

calm...@gmail.com

unread,
May 21, 2025, 1:44:06 AM5/21/25
to The Ring Programming Language
Helllo Clement,

Thank you for the praise.

Greetings,
Gal Zsolt

Reply all
Reply to author
Forward
0 new messages