Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#1704) Implement a Multiline Text #1706

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fabriciofx
Copy link
Contributor

@fabriciofx fabriciofx commented Dec 28, 2023

Implements a Multiline Text.

new Joined(
" ",
"The quick brown fox jumps over the lazy",
"black dog and after that returned to "
Copy link
Contributor

@pnatashap pnatashap Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I can still calculate correctly, the string 'The quick brown fox jumps over the lazy black dog and after that returned to the' is exactly 80 symbols which is the default value, so looks like expected value is wrong.
The problem is in size variable during calculation, you always add SPACE

@fabriciofx
Copy link
Contributor Author

@pnatashap Can you take another look, please?

@pnatashap
Copy link
Contributor

Now it works fine, several points that it is not easy to understand (just my point of view):

  1. StringBuilder with line is current word or this word with space, not sure that we need separate builder for this.
  2. Not very clear that we try to check current word and the next word in one iteration, it looks like can be simplified

@pnatashap
Copy link
Contributor

@yegor256 @victornoel please take a look

@yegor256
Copy link
Owner

@fabriciofx what is the motivation for this? Do we have a ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants