Wish [Wish] StringBuilder new method: AppendNewLine

LWGShane

Well-Known Member
Licensed User
Longtime User
It would be helpful if the StringBuilder had a method that would add a new line automatically.

Current Way:
B4X:
SB.Append("Hello").Append(CRLF).Append("World").Append(CRLF).Append("!")

With the AppendNewLine method, the above would be shortened to this:
B4X:
SB.AppendNewLine("Hello").AppendNewLine("World").AppendNewLine("!")

And would still output:

B4X:
Hello
World
!
 

somed3v3loper

Well-Known Member
Licensed User
Longtime User
For now try something like this

B4X:
Public sub AppendNewLine(sb as stringbuilder, text as string) as stringbuilder

    sb.Append(text)

    sb.Append(CRLF)

    return sb

End sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…