I have an autotextsizelabel that I am sending multiple lines delineated with a Chr(13) & Chr(10) as a carriage return and line feed.
When I look at the text being loaded it has a CHR(13) and CHR(10) within, but when I do at .contains, it fails.
When I display the ASCII of each character is shows that both the Carriage return and line feed are both Chr(13).
Since I can't show the chr(13) and chr(10) in this environment, I have captured an image from notepad++. This was copied directly from the B4a IDE the Variable "value as string".
I can't figure out how, when I look at the data it is correct; it fails the contains and when I loop through character by character it is 13 and 13 when I can see it is not.
Any ideas will be greatly appreciated.
Thanks
Rusty
When I look at the text being loaded it has a CHR(13) and CHR(10) within, but when I do at .contains, it fails.
When I display the ASCII of each character is shows that both the Carriage return and line feed are both Chr(13).
I hereby authorize and consent to examination and treatment as deemed necessary by physicians of A Medical Group, Inc. <---<< this has a chr(13) & chr(10)
I authorize release of information to my insurance carrier should it be necessary. <---<<< same here
The undersigned agrees to pay any costs incurred by this clinic in the event of account delinquency, all amounts due including, but not limited to, reasonable attorney’s fees. <---<<< same here
I hereby assign all medical and/or surgical benefits, including major medical benefits to which I am entitled, including Medicare, private insurance and other health plans to this clinic.<---<<< same here
B4X:
'this code is in the SetText of autotextsizelabel
Public Sub setText(value As String)
mLbl.SingleLine = False
mLbl.Text = value
Dim multipleLines As Boolean = value.Contains(chr(13) & chr(10)) <---<< this results in FALSE
multipleLines = value.Contains(Chr(13)) Or value.Contains(Chr(10)) <---<< this results in TRUE
For i = 0 To value.Length -1
Log("i = " & Asc( value.SubString2(i, i+1)) & " " & value.SubString2(i, i+1)) <---<< see next comment
Next
...
i = 46 .
i = 32
i = 13 <---<< this is correct
i = 13 <---<< this shows Chr(13) and should be a Chr(10)
i = 73 I
i = 32
i = 97 a
i = 117 u
i = 116 t
i = 104 h
i = 111 o
i = 114 r
...
Since I can't show the chr(13) and chr(10) in this environment, I have captured an image from notepad++. This was copied directly from the B4a IDE the Variable "value as string".
I can't figure out how, when I look at the data it is correct; it fails the contains and when I loop through character by character it is 13 and 13 when I can see it is not.
Any ideas will be greatly appreciated.
Thanks
Rusty