5.5.1.2.5 Let-coercion to String * length (fixed-length strings)
The semantics of String * length Let-coercion depend on the source’s value type:
Source Value Type |
Destination Declared Type |
Semantics |
---|---|---|
String |
String * length |
If the source string has more than length characters, the result is a copy of the source string truncated to the first length characters.
Otherwise, the result is a copy of the source string padded on the right with space characters to reach a total of length characters. |
Any numeric type, Boolean or Date |
String * length |
The result is the source value Let-coerced to a String value and then Let-coerced to a String * length value. |