/PreFill

PreFill adds desired characters onto output values to increase their legibility.

Primary LanguageC#MIT LicenseMIT

PreFill

PreFill PreFill License

PreFill is a project to align horizontally listed output values to right side in order to increase their legibility.

PreFill

Description

PreFill has methods to fill desired value preceeding of values to align them. Empty character, letter or number can be used to make different lenghted values align right. Supported data types: (sbyte, byte, int, uint, long, ulong, string, object)

How to download

Release: Latest release

Download on NuGet gallery

.NET CLI:

dotnet add package PreFill

PreFill is optimized for CPU-intense applications.

Example Usage

  • PreFilledCustom(5, 4, '0') => "0005"
  • PreFilledCustom(null, 4, '0') => "0000"
  • PreFilledCustom(55, 3, ' ') => " 55"
  • PreFilledCustom("abc", 5, 'd') => "ddabc"
  • PreFilledCustom({5, 4, 55, 45, 32, 375}, 4, '0') => {"0005", "0004", "0055", "0045", "0032", "0375"}
  • PreFillCustom(5, 4, '0') => "000"
  • PreFillCustom(55, 3, ' ') => " "
  • PreFillCustom("abc", 5, 'd') => "dd"
  • PreFillCustom({5, 4, 55, 45, 32, 375}, 4, '0') => {" ", " ", " ", " ", " "}
  • PreFill1(5, ' ') => ""
  • PreFill2(5, ' ') => " "
  • PreFill8(5, ' ') => " "

To check listed methods, example of output visit wiki page. PreFill Wiki

Version History

See Changelog

Task list

  • Create an issue or check task list: Issues

Licence

This repository is licensed under the "MIT" license. See MIT license.

Licence

MIT license

Authors & Contributing

If you'd like to contribute, then contribute. contributing guide.

Contributors

Help

Twitter: @enesokullu