<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > String Operations |
MiniRobotLanguage (MRL)
BLB. Command
Before Last Backslash
Intention
Split a file-path or string (text) at the slash or backslash. Return the Part before the last backslash or slash in the string. The effect is very simple. If you have a string:
http://www.fa2.de/index.html
BLB. will return all thats before the last slash/backslash, in this case we get
http://www.fa2.de
As it supports the backslash "\" as well as the slash "/", it can be used on windows-pathes as well as on web-URLs.
Syntax
BLB.[P1][|P2]
Parameter Explanation
P1 - Path or hyperlink or String
P2 - Variable for Result. If omitted, Result is been put on TOS.
Example
'***********************************************
' Sample: BLB
'
'***********************************************
'
' fill variable $$MYP
VAR.§§MYP=?pfad\AWT.dll
'
' use ALB to get the path into §§SOL
BLB.§§MYP|§§SOL
PRT.Before BLB: §§MYP
PRT.After BLB: §§SOL
' Another example
VAR.§§FIL=C:\MyDir\Mydir2
' In this case the result will be placed on the TOS
BLB.§§FIL
' Use VRT. if you have pathes with a "\" at the end
VAR.§§FIL=C:\MyDir\Mydir2\
' In this case the result will be placed on the TOS
VRT.§§FIL|\
BLB.§§FIL
DMP.6
MBX.Ready
ENR.
'-----------------------------------------------------------
Remarks
-
Limitations:
-
See also: