Module for EDI 9.12 | Building Services with EDI Module | Part I WmEDI Package | WmEDI Util Folder | Summary of Elements in this Folder | wm.b2b.edi.util:pad
 
wm.b2b.edi.util:pad
WmEDI. Adds blank spaces to a field, left- or right-justifying the field as specified. Also truncates the data field if the data is longer than the length specified. Leading and trailing spaces are deleted prior to padding spaces.
Input Parameters
input
String String data.
length
String The total length that you want the resulting field to be.
from
String (optional) Whether you want the String left or right justified.
Value
Meaning
left
Align the field's value to the left, adding blank spaces to the right of the field value. If the length specified is shorter than the actual input data, the input data string is truncated from the right.
right
Align the field's value to the right, adding blank spaces to the left of the field value. If the length specified is shorter than the actual input data, the input data string is truncated from the left.
Output Parameters
result
String The resulting String data.