8.3.8 Right (return characters from the right side of a string)
- Purpose
-
Returns a substring containing a specified number of characters from the right side of a string.
- Syntax
Right (String, Length)
- Arguments
-
- String
-
Specify the string itself or a variable that stores this value.
- Length
-
Specify the number of characters to retrieve from the specified string. Write the number itself or a variable that stores this value.
If you specify 0, a zero-length string ("") is returned. If you specify a value greater than all the characters in the string you set in String, the Right command returns all the characters in the specified string.
- Description
-
The Right command returns a substring containing a specified number of characters from the right side of a specified string.
One two-byte-character and one one-byte-character are both handled as one character.
To check the length of the string, use the Len command.
- Example
' This code stores "EFGH" in variable string1. Dim string1 string1 = Right ("ABCDEFGH", 4)
- JP1/Script version
-
Supported from JP1/Script 01-00.