DBWAddSpacesLeft

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > PDMSystem >

DBWAddSpacesLeft

Description

Add spaces to the left side of a string for output formatting.

Syntax

Function DBWAddSpacesLeft(stringmaxfieldsize)

Parameters

string

is the string to adding space to.

maxfieldsize

is the max size of the field to fill

Return Values

The input string str added of spaces before it (up to maxfieldsize).

In case of str is longer than maxfieldsize it returns str as it is.

Example

mystring="hallo!"
maxfieldsize=10
mystring=DBWAddSpacesLeft(str, maxfieldsize)
msgbox mystring