Question:
How can I split a string into smaller parts?
Solution:
To do so, you can use the Global Managerâs Right, Left and Mid functions, found at Elipse SCADAâs Global Manager.
Right (string, nCount)
Returns the nCount characters to the right of the stringâs parameter.
Example of script: str = Right(âPasswordâ,4) // returns âwordâ
Left (string, nCount)
Returns the nCount characters to the right of the stringâs parameter.
Example of script: String = Left(âPasswordâ, 4) // returnsâPassâ
Mid (strText, nFirst, [nCount])
Returns part of strText according to nFirst and nCount parameters. nFirst especifies the position, in the string, of the first character of the substring that is returns (count starts at zero). nCount is the number of characters of the substring.
Examples of script: strSenha = Mid(âPasswordâ, 0, 3) // returnsâPasâ
       strSenha = Mid(âPasswordâ, 3, 4) // returnsâsworâ
             strSenha = Mid(âPasswordâ, 2) // returnsâsswordâ
