Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Empty Line at the end of ARRAY.
#5
Thanks Gintaras!

I was able to work up exactly what I need from what you've posted. Usually I'm setting text to a file or doing something with it other than just outputting. Now I have a better way to get text from an ARRAY to a string without that annoying little empty line!

Member function str.FromArray
Code:
Copy      Help
function ARRAY(str)&a

;;Example
;ARRAY(str) a
;int i=1
;rep 10
,;a[]=_s.from("Line " i)
,;i+1
;_s.FromArray(a)
;
;out _s

str s=a
if(s.len)
,s.fix(s.len-2)
this=s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)