SETLEN        Assign length of specified string to a variable

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Script Programming > Script Commands > All Script Commands >

SETLEN        Assign length of specified string to a variable

Syntax:

SETLEN

[ variable ]  =  [ string ]

Arguments:

[ variable ]

Variable to assign; if the variable does not previously exist it is created.

 

[ string ]

Variable or string to get the length of.

Options:

none

 

 

This script command obtains the length of [ string ] and saves the result in [ variable ].

 

Consider the following example.

 

;; assign a variable to a string

SET string = "this is a string"

;; get the length of the string

SETLEN len = string

;; len will be equal to 16

 

 

Related command(s):        SET, SETEXTRACT, SETRIGHT, SETLEFT, SETMID, SETSUBSTR, SETREPLACE