Testing for string in file using javascript [closed]

I have a 5K text file of vocabulary words (over 100,000 words, either in xls or txt file). I only want to test if a given string exists in the text file using javascript / jquery.
1) Do I need a library function to do this?
2) Is the size of the file a problem in terms of performance?

Thanks for any help…

Answer

Since you haven’t tried anything yet or provided code, I’ll give you a general layout and place to start.

1) Get your data file via Ajax

2) Use indexOf or match to check for a match. Performance stats here.

Leave a Reply

Your email address will not be published. Required fields are marked *