String :: leftJustified - Get a fixed length String left padded by a fill character.
The function returns a new String object of iSize characters filled with padding characters at the end, 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 iSize is zero the calling string is cleared. When iSize is less than zero, the function throws an exception.
Implementation overview
- Get a fixed length String left padded by blank
String :: leftJustified ( iSize ) - Get a fixed length String left padded by a fill character
String :: leftJustified ( iSize, cString )
Implementation details
-
Get a fixed length String left padded by blank
odaba::String String  :: leftJustified ( int32 iSize )
The function returns a new String object of iSize characters that contains this string padded by blanks.
- iSize
- Size
Size of the instance or property area. For string objects, the size is usually measured in units.
to list
- iSize
- Size
-
Get a fixed length String left padded by a fill character
odaba::String String  :: leftJustified ( int32 iSize, odaba::String &cString )
The function returns a new String object of iSize characters that contains this string padded with fill characters passed in cString. When coding types differ, a copy of cString is created and recoded before filling.
If the actual length in units is greater or equal iSize or the passed cString is empty, the calling string remains unchanged.
- 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).
to list
- iSize
- Size