I needed this one to create a csv file. Here is my little method, maybe it should be a class ?
public static string GetFixedLengthString(string input, int length)
{
string result = string.Empty;
if (string.IsNullOrEmpty(input))
{
result = new string(' ', length);
}
else if (input.Length > length)
{
result = input.Substring(0, length);
}
else
{
result = input.PadRight(length);
}
return result;
}
Wednesday 28 May 2008 | Predicate<T>
Cher Entreprenaute, vous pouvez trouver ici votre passeport pour l'economie numerique
Smart Code Generator
Serialcoder participe activement au projet opensource Smart Code Generator
smartcodegenerator