String replace

Dirk A

Member
Licensed User
Longtime User
Hello,

I've got a string that contains about 32kb of data . Throughout the string there are clusters of 'FF' blocks . I want to replace them using the
B4X:
str.replace
function, but afterwards when the string is written to a file I see that not all 'FF' blocks are replaced . Even though
B4X:
str.IndexOf("FF")
gives me -1

this is the replace command :
B4X:
 str = str.Replace("FF","AA")
 

klaus

Expert
Licensed User
Longtime User
What do you mean with "FF" ?
Two times the letter F or do you mean the FormFeed character ?
If FF means FormFeed you should use:
str = str.Replace(Chr(12), "AA")
or replace "AA" by something else depending on what AA means.

Best regards.
 
Upvote 0
Top