A problem of ByteConverter.toChars

dreamworld

Active Member
Licensed User
Longtime User
Dim BC as ByteConverter
dim C() as char=BC.toChars(text)
To my surprise, C(0) is not the first char of the text, and the first char of the text is C(1).
It is quite confusing. Why add a char that does not belong to the text at the front of the array?
 

dreamworld

Active Member
Licensed User
Longtime User
The text was from a txt file added into the B4A project.
And I get the text with "File.GetText(File.DirAssets,FileName)"
I am sure that there was not an invisible char at the front of the text.
 
Upvote 0
Top