Use this function to remove leading and/or trailing spaces from a given string. The integer parameter determines whether spaces on the left, right, or both ends are to be removed. The resulting string is returned.
Parameter |
Description |
String |
Enter a valid string. The default is the value of the current field. |
Integer |
Choose from these options: 0 - remove trailing spaces The default is two (2). |
The system removes leading and trailing spaces from the string specified in parameter one. The Integer parameter determines which spaces are removed.
Here are some examples:
(Assume the current field contains the text " Your Name")
Function |
Result |
Explanation |
Trim (" Value ") |
"Value" |
Defaults to trim leading and trailing spaces. |
Trim (" Value ", 0) |
" Value" |
Removes trailing spaces. |
Trim( ) |
"Your Name" |
Use current field and remove leading and trailing spaces. See the note below. |
Note | During field entry, the system automatically removes trailing spaces from values entered by the user. Only variables assigned during DAL scripts are likely to have trailing spaces. |
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices