Operators |
tuple_str_last_n — Cut all characters starting at position “n” out of a string tuple.
tuple_str_last_n cuts all characters from position “n” to the end of the string out of each string of the input tuple String and returns them as new strings in the output tuple Substring. The position “n” is determined by the second input tuple Position. If Position only contains one element, this element contains “n”. If String and Position have got the same number of elements, the first element of Position determines the start position for the first string of String, the second element of Position does so for the second string of String and so on. If Position contains more than one element and String contains only one string, tuple_str_last_n cuts more than one substrings out of this string. The elements of Position then determine the start positions for these substrings. If both input tuples contain more than one element but differ in the number of elements, tuple_str_last_n returns an error.
For general information about string operations see Tuple / String Operations.
If both input tuples are empty, the operator returns an empty tuple. Similarly, if String is empty and Position is not, the operator returns an empty tuple. In contrast, if Position is empty and String is not, an exception is raised.
HDevelop provides an in-line operation for tuple_str_last_n , which can be used in an expression in the following syntax:
Substring := str_lastn(String, Position)
Input tuple with string(s) to examine.
Input tuple with position(s) “n”.
The last characters of the string(s) starting at position “n”.
tuple_str_first_n, tuple_substr, tuple_strstr, tuple_strrstr, tuple_strlen, tuple_strchr, tuple_strrchr, tuple_split, tuple_environment
Foundation
Operators |