Hi Rolf,
Thank you
I tried but the result remains the same.
Text is hidden in Listview as in the previous post.
This is a part of code that I inserted.
B4X:
Valore2=Cursor1.getstring("Cosa")
Valore2=Valore2.Replace(Chr(13),"")
ListaCose.AddTwoLines2(Valore2,Valore3,Valore)
Next
I also tried with
Valore2=Valore2.Replace(Chr(10),"")
but with no result
Hi Rolf,
Thanks for your help, but the problem is not solved.
When I put the text I press Enter on the keyboard (so the return should Chr (13) & Chr (10) )
or perhaps it could be a different code?
Nicola
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
valore=Cursor1.GetString("Codice")
valore2=Cursor1.getstring("Cosa")
Valore3=Cursor1.getstring("Dove")
If valore2.Length >=30 Then
Valore2=valore2.SubString2(0,30)&"..."
End If
If valore3.Length >=39 Then
Valore3=valore3.SubString2(0,39)&"..."
End If
ListaCose.AddTwoLines2(Valore2.Replace(Chr(13)& Chr(10),""),Valore3,Valore)
Next
Cursor1.Close
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
Valore=Cursor1.GetString("Codice")
Valore2=Cursor1.getstring("Cosa")
Valore2 = Valore2.Replace(Chr(13),"")
Valore2 = Valore2.Replace(Chr(10),"")
Valore3=Cursor1.getstring("Dove")
If Valore2.Length >=30 Then
Valore2=Valore2.SubString2(0,30)&"..."
End If
If Valore3.Length >=39 Then
Valore3=valore3.SubString2(0,39)&"..."
End If
ListaCose.AddTwoLines2(Valore2,Valore3,Valore)
Next
Cursor1.Close
You can see what is going on a little with this too
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim theline As String
theline = Chr(13) & "We love to go to " & CRLF & " the store." & Chr(9) & Chr(13)
cleanword(theline)
End Sub
Sub cleanword(bigword As String)
Dim c As Int
Dim BuildWord As String
'
' go through the bigword - character by character
'
Log("##################### START ##################################")
Log("Big Word Length is: " & bigword.Length )
For c = 0 To bigword.Length
' Examine each character that is not
' a valid character and report it to the log
'BuildWord = BuildWord & bigword.CharAt(c)
'Log(BuildWord)
MyASci = Asc(bigword.CharAt(c))
If MyASci < 32 Then Log("**Chr(" & MyASci & ") was found! at Position: " & c )
If MyASci > 126 Then Log("**Chr(" & MyASci & ") was found! at Position: " & c )
Next
End Sub
Strings are immutable in Java (and C#) so String functions return a new String and do not alter the existing one. You will have to assign the returned String to the existing variable if you want the effect of altering a String.