search in app ?

parijs

Active Member
Licensed User
Longtime User
Hi,
Is there a way to make a search in my app to words.
Al my text are in many file.txt not in the code itself
 

parijs

Active Member
Licensed User
Longtime User
Hi Erel,

I guess I did not quite tell.
Until now I load 380 text files in with this code (at the end perhaps 600)

Reader.Initialize (File.OpenInput (File.DirAssets, main.textpage & ". Txt"))

These are so well in the APK file I don't send them separately
Can I still use "load the file and then use with File.ReadString String.IndexOf" and/or Regex?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Do you want to allow searching for any string? Or only a determined set of terms?

There are several possible solutions.
I would start with a database solution. Convert your files to a database. Make sure that there is an index on the text column. You can have the file name stored as an additional field. This will allow you to find the files that contain the term.
 
Upvote 0
Top