🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators pad
This page was created by Stephanie on 2025-01-08. Last edited by Wikiadmin on 2026-08-17.

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 Car class with a Name attribute, 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.

See also