jehugaleahsa / mustache-sharp

An extension of the mustache text template engine for .NET.
The Unlicense
306 stars 80 forks source link

adding padding spaces to an identifier #83

Closed last-Programmer closed 5 years ago

last-Programmer commented 5 years ago

Hi, I would like to make the identifier specific width by adding right side spaces?

How to do that?

Thanks

jehugaleahsa commented 5 years ago

The placeholders use the same formatting that String.Format accepts: https://docs.microsoft.com/en-us/dotnet/api/system.string.format?view=netframework-4.7.2#controlling-spacing

last-Programmer commented 5 years ago

can you please give me an example? because it does not work

I tried this {{Name:{0,40}}} . It does not work. I get the error input string was not in correct format

last-Programmer commented 5 years ago

sorry i got it by doing {{Name,40}}..Thanks