Hi All,
I have a string that I need to be a set length (8), I need a method of packing out the string to be 8 characters long. If the input string "12" I need the packing to be "12000000" if the string is "1234" the packing to be "12340000". I have either asked or told someone how to do this but can't find the method in any of my files! (FRUSTRATING!!!!)
Glenn
Hmmm, .PadRight ???? found MSDN any help?
Packing A string to a set length
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Glenn PattonRank #6,159 · 275 reputationPosted Jan 28, 2013, 1:44 AM EST
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Jan 28, 2013, 1:46 AM EST
Deepak VermaRank #672 · 3.6K reputationPosted Jan 28, 2013, 1:50 AM EST
consider this code:
String str = "abc";
str = str.PadRight(8, '0');
now string "str" is holding "abc00000", as you need!
If the str is empty, the result will be "00000000".