What is the new framework’s EndOfLine equivalent? At the moment my work-around is:
Dim eol As Text = Text.FromCString(EndOfLine, Xojo.Core.TextEncoding.UTF8)
What is the new framework’s EndOfLine equivalent? At the moment my work-around is:
Dim eol As Text = Text.FromCString(EndOfLine, Xojo.Core.TextEncoding.UTF8)
[quote=184483:@Eli Ott]What is the new framework’s EndOfLine equivalent? At the moment my work-around is:
Dim eol As Text = Text.FromCString(EndOfLine, Xojo.Core.TextEncoding.UTF8)
&u0D
Isn’t that just for iOS though?
Indeed. In iOS, EndOfLine does not exist. In Desktop, I would not bother.
There isn’t one right now. What is your use case?
This can be done simpler:
Dim eol As Text = CType(EndOfLine, String).ToText
or:
Dim eol As Text = EndOfLine.Operator_Convert().ToText
Actually, that’s the carriage return used by the classic Mac OS. &u0A is the newline character on OS X, iOS, and Linux.
[quote=184494:@Joe Ranieri]@Michel Bujardet &u0D
Actually, that’s the carriage return used by the classic Mac OS. &u0A is the newline character on OS X, iOS, and Linux.[/quote]
Of course. My bad. Thank you for correcting.
What is the verdict of this ? What are we supposed to use for EndOfLine on iOS where EndOfLine does not exist at all to use ?
does “Xojo for iOS” recognize escaped sequences? if so, than "
" should be a valid subsitute.
Why not just define it as &u0A for your own purposes
That is the newline character on OS X, iOS, and Linux.
Thanks Norman, I had not realised I could use it in that way. That is the &u0A syntax.
Short test then it works like this:
Dim s as Text
s = “Test” + &u0A + “Test2”
MsgBox s
The following:
Dim s as Text
s = "Test
" + “Test2”
Does NOT work in iOS
The following does…
Note: &u0D carriage return, &u0A is newline in iOS
MessageBox1.Title = “About”
MessageBox1.Message = “App title” + &u0A
MessageBox1.Message = MessageBox1.Message + “© 2018 Fred Dagg” + &u0A
MessageBox1.Message = MessageBox1.Message + “f.dagg@erehwon.com”
MessageBox1.show
s = "Test\
" + "Test2"
Wrong: is yu MsgBox it you will get: "Test\
Test2"
without the quotes.
A string is a string. To add something else, use the proper syntax (if/when allowed)
[quote=374028:@Philip Cumpston]The following:
Dim s as Text
s = "Test
" + “Test2”
Does NOT work in iOS
[/quote]
You are confusing Xojo with OC. "
" was never endofline in Xojo.
Hi Michael,
That was my point - referring to Dave S’s suggestion. I tried it out and felt it was a pity it didn’t work, as it would have been so simple.
I suppose one could define these escape characters that appear in many text editors to have the same function as the unicode ones…?