|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Library Reference > PDMSystem > DBWAddZerosLeft |
Add 'zero' characters to the left of a string for output formatting.
Function DBWAddZerosLeft(str, maxfieldsize)
str |
the string to add zero chars to |
|---|---|
maxfieldsize |
max size of the field to fill |
The input string str added of 'zeros' before it (up to maxfieldsize).
In case of str is longer than maxfieldsize it returns str as it is.
mystring="12"
maxfieldsize=5
mystring=DBWAddZerosLeft(str, maxfieldsize)
msgbox mystring 'mystring contains now "00012"