Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 83883

How to import lines from external text file?

$
0
0

Hello,

 

I have been struggling with external text files for pretty long time now. I have lots of text and that is why I think I should take it from external file for easier editing and of course cleaner code.

 

For example:

 

week.txt

Monday is a nice day.

Tuesday is too.

Wednesday is also.

Thursday is not.

Friday is maybe.

Saturday is maybe not.

Sunday is definitely.

 

I should have a code that will somehow take these lines apart from each other and show them one by one (first the first line, second the second, third time the third line...) whenever I call for a function. I know I can probably use \n to determinate where line ends but I am not sure how to do it. Handling text is not something I do that often.

 

I am also not sure if this is a good way of handling this situation but I would still like to know how to do this.

 

I am not asking for straight code (although I of course would also appreciate it) but some tips that will help me get closer to how to do this.


Viewing all articles
Browse latest Browse all 83883

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>