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?
Loading
Deepak VermaPosted Jan 28, 2013, 6:50 AM
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".
Santhosh Kumar JayaramanPosted Jan 28, 2013, 6:46 AM
Glenn PattonPosted Jan 28, 2013, 6:44 AM