You can use this page to find the verified syntax and behavior of the OCL operator named pad when writing OCL expressions in MDriven Designer.
For example: Given a Class Car with attribute Name.
Car.allInstances->first.Name.pad(20,'dsd')
The above OCL returns
This expression produces the following result:
| sddsddsddsddsdToyota |
Status
The available documentation does not yet define the pad operator's syntax or result. Do not rely on this page to determine how pad handles a value, how it is called, or what it returns.
Information required
To document pad accurately, this page needs:
- The complete OCL expression, including its receiver and arguments.
- The supported input type or types.
- The return type.
- The padding character, length, and alignment rules.
- Behavior when the input already meets or exceeds the requested length.
- Null and empty-string behavior.
- A verified example using a
Carclass with aNameattribute, including the returned value.
Related operators
For an operator that may be related, see Documentation:OCLOperators postPad. For string-length operations, see Documentation:OCLOperators length and Documentation:OCLOperators Size () : Integer.
