Mintoris Forum

Author Topic: Re: Simple Browser - Words and Files  (Read 2554 times)

wills

  • Full Member
  • ***
  • Posts: 34
Re: Simple Browser - Words and Files
« on: Jul 15, 2013, 02:10 PM »
Chuck, this is similar to my question on the hHTML browser.  I have been doing some reading and even though you can not get the full path returned.  If you are supporting the File System api you could use blob's to read a text file or a binary for input or output.  This would work where all I wanted to do was read in a text file of words for my word search. There might be other uses as long as you don't need the full path.

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: Simple Browser - Words and Files
« Reply #1 on: Jul 16, 2013, 12:13 AM »
wills, If you want to use the full path check out the RootDir On command.

If you are interested in breaking text into words, check out the Item commands.

Delimited Strings

a$() = ItemSplit$("this is a line of text", " ")

a$(0) = "this"
a$(1) = "is"
a$(2) = "a"
a$(3) = "line"
a$(4) = "of"
a$(5) = "text"

So if you did a:

Read 1, data$
word$() = ItemSplt$(data$, " ")

You would get an array of all the words in a text file. You would still have to strip out all the punctuation and you might want to do a trim$() on the words.

I also have some dictionary text files which I've attached below.

btw: When you start a new topic I get an email and my phone beeps.

hope this helps.

Oh don't read the badwords.txt file if you are easily offended.
« Last Edit: Jul 16, 2013, 01:00 AM by Chuck »

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: Simple Browser - Words and Files
« Reply #2 on: Jul 16, 2013, 12:44 AM »
Oh, here are some Basic programs I wrote to create SQLite databases of words.