I have a problem.
When I do a string it works and replaces my text.
However, when I load a longer text in a text file with end of line or tab characters, it does not replace the text.
How do I solve this?
When I do a string it works and replaces my text.
However, when I load a longer text in a text file with end of line or tab characters, it does not replace the text.
How do I solve this?
B4X:
Sub replace_into_filetext(input As Map) As String
Dim tresc As String = File.ReadString(File.DirApp , "clear.txt")
For i=0 To input.Size-1
Dim key As String = input.GetKeyAt(i)
If tresc.Contains(key) Then
tresc = tresc.Replace(input.GetKeyAt(i), input.GetValueAt(i))
End If
Next
Return tresc
End Sub