company logo

String :: rightJustified - Get a fixed length String with fill characters followed by string.

The function returns a new String object of iSize characters filled with padding characters at the beginning, when the current string length is lower than iSize. When the current string length (lengthInUnits()) exceeds iSize, then the resulting string is truncated at position iSize.

When the size is less than zero, the function throws an exception.

Return value:  String value ( odaba::String & )

Implementation overview

Implementation details

  1. Get a fixed length String left padded by blank
    odaba::String String  :: rightJustified ( int32 iSize )

    The function returns a new String object of iSize characters that contains this string padded by blanks at the beginning.

    • iSize - Size

      Size of the instance or property area. For string objects, the size is usually measured in units.

  2. to list
  3. Get a fixed length String left padded by a fill characters
    odaba::String String  :: rightJustified ( int32 iSize, odaba::String &cString )

    The function returns a new String object of iSize characters that contains this string preceded by fill characters passed in cString. When coding types differ, a copy of cString is created and recoded before filling.

    • iSize - Size

      Size of the instance or property area. For string objects, the size is usually measured in units.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

  4. to list