Use this function to remove characters from a string at a specified position and return the result.
Cut (String, Position, Length)
Parameter |
Description |
String |
Enter a valid string. The default is the value of the current field text. |
Position |
Enter the position within the first parameter to begin cutting. The default is one (1). |
Length |
Enter the length to cut from text. The default is zero (0). |
This function returns a string equivalent to parameter 1 with the portion identified by the position and length parameters removed. If no position is given, or it is zero (0), the cut starts at position 1 in the string.
If no length is given, or it is zero (0), nothing is removed from the string and the return value is the same as the original string parameter.
Here are some examples:
(Assume the current field contains the text Your Name.)
Function |
Result |
Explanation |
Return(Cut ( )) |
Your Name |
No length is specified for the cut function; therefore the field remains the same. |
Return(Cut ( , , 5)) |
Name |
Five characters are cut from the current field beginning at position 1. |
Return(Cut ("Complete all the blanks.", 10, 4)) |
Complete the blanks |
Goes to position 10 to begin the cut and removes four characters. |
Return(Cut ("Complete all the blanks.", ,9)) |
all the blanks |
Defaults to position 1 to begin the cut and cuts nine characters. |
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices