Files
learngo/21-project-text-wrapper/README.md

23 lines
943 B
Markdown
Raw Normal View History

2019-04-03 19:33:36 +03:00
# Text Wrapper Challenge Guideline
In this project your goal is to mimic the soft text wrapping feature of text editors. For example, when there are 100 characters on a line and if the soft-wrapping is set to 40, the editors cut each line that goes beyond 40 characters and display the rest of the line in the next line instead.
## EXAMPLE
Wrap the text for 40 characters in a line. For example, for the following input, the program should print the following output.
**INPUT:**
2019-04-05 15:06:49 +03:00
Hello world, how is it going? It is ok. The weather is beautiful.
2019-04-03 19:33:36 +03:00
**OUTPUT:**
2019-04-05 15:06:49 +03:00
Hello world, how is it going? It is ok.
The weather is beautiful.
2019-04-03 19:33:36 +03:00
## RULES
2019-04-05 15:06:49 +03:00
* The program should also work with Unicode text. You can find a unicode story in [story.txt](story.txt) file in the current folder. Please use the text in the file and soft-wrap it to 40 characters.
* The program should not cut the words, and should put the whole words on the next line.