NuGet Package Minimod.PrettyText

Extends System.String/IEnumerable<string> by following methods:

a) ShortenTo(int length, string hint = "..."):
Crops a text to fit into certain number of chars.

Appends 'hint' if it has to be cropped;

b) WrapAt(int margin):
Nicely wraps a text at the given margin. Tries not to split in the middle of words.

c) SplitLines, JoinLines:
Splits a string into a list of lines; or joins it.

Both using Environment.NewLine

d) IEnumerable<string>.IndentBy(int leadingChars):
Indents a each of a list of lines by given number of spaces.

e) string.IndentLinesBy(int leadingChars):
Indents each line in the string by given number of spaces.




Got any Minimod.PrettyText Question?





Info

Version: 2.0.1
Author(s): Lars Corneliussen
Last Update: Tuesday, March 15, 2016
.NET Fiddle: Create the first Fiddle
NuGet Url: https://www.nuget.org/packages/Minimod.PrettyText


Install
Install-Package Minimod.PrettyText
dotnet add package Minimod.PrettyText
paket add Minimod.PrettyText
Minimod.PrettyText Download (Unzip the "nupkg" after downloading)

1 package depend on this package.


Tags



STATS

must-have-score

avg-downloads-per-day

3

days-since-last-release

2935