Read-RightString

The command copies a fixed number of characters starting at the right side of a string and stores the resulting string in a variable.


Settings:

  • String
    Character string from which characters are to be copied.
  • Number of characters to copy
    Number of characters to be copied from the string. If 0 is specified, no character is copied.
  • Store result in
    Name of the variable in which the read out substring is to be stored. Specify only the name of the variable, not the $ sign and the curly brackets.


Example:

The following example reads the two right characters of the computer name from the %Computername% environment variable and stores the result in the _ComputerID local variable:


Corresponds to DSM eScript command:

  • StrRight


See also: