Returns the right-most characters of a string.
sSubstring = Right (sString, iNumChars)
Variable | Description |
---|---|
sSubstring | The returned substring. STRING. |
sString | The string from which to extract a substring. STRING. |
iNumChars | The number of characters to extract, starting with the right-most. INTEGER. |
Right returns the right-most iNumChars characters in sString. If iNumChars is zero, Right returns an empty string (""). If iNumChars is greater than the length of sString in characters, Right returns sString. If iNumChars is less than zero, an exception is raised.
STRING s = "Hello World" Print (Right (s, 5) ) // prints: World Print (Right (s, 20) ) // prints: Hello World