Read-MidString

Copies a substring of fixed length from a certain character of a string and stores the substring in a variable.


Settings:

  • String
    Character string from which characters are to be copied.
  • Start copying at char (1 = beginning)
    Character of the string from which the substring is determined. Counting starts from the left.
  • 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 example reads the digits 3 to 10 from the value of the variable _UNCPath and stores the result in the variable _Servername (assumption: server names are always 8 characters long in the example ;-):


Corresponds to DSM eScript command:

  • StrMid


See also: