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

Does it have word wrap, and maybe Justify options? #14

Open
Layarion opened this issue Mar 29, 2020 · 5 comments
Open

Does it have word wrap, and maybe Justify options? #14

Layarion opened this issue Mar 29, 2020 · 5 comments

Comments

@Layarion
Copy link
Contributor

Layarion commented Mar 29, 2020

I'm looking for something to format my text by not splitting words in half, and sometimes I have an use for Justify formatting styles.

I ask because on the very nice readme/wiki page no mention of it was made. Is there more documentation somewhere?

@equiman
Copy link
Member

equiman commented Mar 29, 2020

Yeah take a look of align section in documentation.

https://github.com/deinsoftware/colorify/blob/master/README.md#writeline

https://github.com/deinsoftware/colorify/blob/master/README.md#align

There is no Justify option.

@Layarion
Copy link
Contributor Author

Layarion commented Mar 30, 2020

I did, but I only see Left, Right, Center, and Split. This doesn't explain if there is a word-wrap or justify option.

The image literally above that, even shows that there isn't a word wrap because "bring" is split at the last character.

I will say though, the documentation is nice. If i'm using a .net core 3.1 Console App does this still work? I'm new to programming and VS but I installed the nuget and I couldn't get the Using Alba.Colorify or whatever it was to be recognized by VS.

@equiman
Copy link
Member

equiman commented Mar 30, 2020

The library works with the .Net framework behavior of WriteLine. Actually there is no custom implementation of word wrap or justify.

It's compatible with .net Core 2 and 3 versions.

I don't understand what is "Alba.Colorify". To understand how this library works, take a look inside Sample folder. Better easy to use a guide than words.

@equiman
Copy link
Member

equiman commented Apr 17, 2020

@Layarion try with this.

_colorify.Wrap("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sed turpis in ligula aliquet ornare tristique sed ante. Nam pretium ullamcorper condimentum. Aliquam quis sodales ex, vitae gravida metus. Suspendisse potenti. Maecenas nunc sapien, semper vel tincidunt sed, scelerisque ut est. Nunc eu venenatis libero. Nulla consectetur pretium leo. Nullam suscipit scelerisque neque fringilla volutpat. Aliquam condimentum, neque quis malesuada ultrices, mauris velit tincidunt arcu, vel sodales tortor felis quis velit. Aliquam tempus ullamcorper orci, vitae pretium leo maximus ut. Aliquam iaculis leo sed tempor mattis.", bgWarning);

Screen Shot 2020-04-16 at 8 45 03 PM

Hope it's what you need.

@equiman
Copy link
Member

equiman commented Apr 17, 2020

I think justify can be done with same idea, but adding the end spaces between word. I will try to add it on the future.

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

No branches or pull requests

2 participants