MitchBu Well-Known Member Licensed User Longtime User Jan 4, 2021 #1 The picker returns the selected text with chr(13) appended. Took me a while to understand why my font change never worked. After trimming the last character, everything is alright. It would be better to fix the issue, but in the meantime: B4X: Sub Trim(Str As String) As String If Str.Length > 0 Then Return Str.SubString2(0, Str.Length-1) End If End Sub
The picker returns the selected text with chr(13) appended. Took me a while to understand why my font change never worked. After trimming the last character, everything is alright. It would be better to fix the issue, but in the meantime: B4X: Sub Trim(Str As String) As String If Str.Length > 0 Then Return Str.SubString2(0, Str.Length-1) End If End Sub
Erel B4X founder Staff member Licensed User Longtime User Jan 4, 2021 #2 Can you reproduce it in a small project? Tip: B4X: 's is a String variable s = s.Trim
MitchBu Well-Known Member Licensed User Longtime User Jan 4, 2021 #3 In the end the bug came from my code. I added items from a text file and the chr(13) came from remaining CHR(13) after splitting with \n. I should have split with \r\n since under Windows, lines are separated by 0D 0A. Never mind. Sorry. Last edited: Jan 5, 2021
In the end the bug came from my code. I added items from a text file and the chr(13) came from remaining CHR(13) after splitting with \n. I should have split with \r\n since under Windows, lines are separated by 0D 0A. Never mind. Sorry.