1 line + the rest, how to write?

[code] IF strPage <> “” THEN
DIM arrArray(-1) as string = split(strPage, EndOfLine )
F1_lblNavigation.Bold = TRUE
F1_lblNavigation.Text = arrArray(0)

F1_txtContent.Text = arrArray(1) <--- HERE!! I want to write all other lines except the first line!

END IF
[/code]

How would you write the text, the content!?
F1_txtContent.Text = replace(strPage, arrArray(1), “” )

This is not good, because the entire text would be replaces… not only the first line! :slight_smile:
https://forum.xojo.com/15593-count-number-of-lines-of-code/0
This thread is similar and I looked at countFields. It’s similar as split.

[code] IF UBound(arrArray,1) > 0 THEN
’ ##LOOP
DIM i as Integer
FOR i = 1 TO UBound(arrArray,1)
F1_txtContent.AppendText( arrArray(i) ) + EndOfLine
NEXT

ELSE
  F1_txtContent.Text = arrArray(1)
END IF[/code]

This works. Is this the way to solve it!?

IF strPage <> “” THEN
DIM arrArray(-1) as string = split(strPage, EndOfLine )

arrArray.remove(0) // remove the 1st line
F1_lblNavigation.Bold = TRUE
F1_lblNavigation.Text = arrArray(0)

F1_txtContent.Text = join(arrArray,endofline)

END IF

[code]IF strPage <> “” THEN
DIM arrArray(-1) as string = split(strPage, EndOfLine )

F1_lblNavigation.Bold = TRUE
F1_lblNavigation.Text = arrArray(0)
arrArray.remove(0) // remove the 1st line <<---- I think it should be here as you are placing line 0 as a heading?

F1_txtContent.Text = join(arrArray,endofline)

END IF[/code]

good point

Thank you!
“join” was a better alternative than the one I wrote!