How To Create a Left-Padding Function To create a left-padding function, follow these steps:


Function Lpad (MyValue, MyPadChar, MyPaddedLength)
Lpad = string(MyPaddedLength - Len(MyValue),MyPadChar) & MyValue
End Function
Response.Write Lpad("123B","0",6)

How To Create a Right-Padding Function To create a right-padding function, follow these steps:


Function Rpad (MyValue, MyPadChar, MyPaddedLength)
Rpad = MyValue & string(MyPaddedLength - Len(MyValue), MyPadChar)
End Function
Response.Write Rpad("123B","0",6)



Want cheaper web hosting?, host your site with EUKHost and Save 15%, use coupon EUKCOUPON, Dedicated, VPS, Shared, Linux, Windows, Reseller - save money on web hosting with our web hosting coupons.