964d0a78bf
Added Voucher Type During Printing Added Discount Report Fixed Void bill table not getting cleared error Added PAX to table Removed Itital Setup button in MainForm as it was not doing anything
26 lines
641 B
C#
26 lines
641 B
C#
namespace Tanshu.Common.Helpers
|
|
{
|
|
public enum Align
|
|
{
|
|
Left = 1,
|
|
Centre = 2,
|
|
Right = 4
|
|
}
|
|
|
|
public static class StringHelper
|
|
{
|
|
public static string Center(this string input, int width)
|
|
{
|
|
if (input.Length > width)
|
|
return input;
|
|
var left = ((width - input.Length) / 2) + input.Length;
|
|
input = string.Format("{0,-" + left + "}", input);
|
|
return string.Format("{0," + width + "}", input);
|
|
}
|
|
|
|
public static string Center42(this string input)
|
|
{
|
|
return Center(input, 42);
|
|
}
|
|
}
|
|
} |