DelBackslash and other slash related functions
;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfSlashUNIX (strString) ; udfSLtoSR ; udfSlashLtoR ; udfBackslashToSlash ; udfBStoS ; udfSlashUNIX.
Return StrReplace (strString, "\", "/")
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfSlashDOS (strString)  ; udfSRtoSL ; udfSlashRtoL ; udfSlashToBackslash ; udfStoBS ; udfSlashDOS.
Return StrReplace (strString, "/", "\")
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsSlashL (strString)
Return StrSub (strString, 1, 1) == "/"
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsSlashL_2 (strString)
Return StrIndex (strString, "/", 1, @FWDSCAN) == 1
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsSlashR (strString)
Return StrSub (strString, StrLen (strString), 1) == "/"
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsSlashR_2 (strString)
Return StrIndex (strString, "/", 0, @BACKSCAN) == StrLen (strString)
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsBackslashL (strString)
Return StrSub (strString, 1, 1) == "\"
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsBackslashL_2 (strString)
Return StrIndex (strString, "\", 1, @FWDSCAN) == 1
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsBackslashR (strString)
Return StrSub (strString, StrLen (strString), 1) == "\"
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfIsBackslashR_2 (strString)
Return StrIndex (strString, "\", 0, @BACKSCAN) == StrLen (strString)
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------



;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfDelSlashL (strString)
Return StrSub (strString, 1 + (StrSub (strString, 1, 1) == "/"), -1)
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfDelSlashR (strString)
Return StrSub (strString, 1, StrLen (strString) - (StrSub (strString, StrLen (strString), 1) == "/"))
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------



;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfDelBackslashL (strString)
Return StrSub (strString, 1 + (StrSub (strString, 1, 1) == "\"), -1)
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfDelBackslashR (strString)
Return StrSub (strString, 1, StrLen (strString) - (StrSub (strString, StrLen (strString), 1) == "\"))
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------



;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfDelBackslashL (strString)
Return ItemRemove (StrIndex (strString, "\", 1, @FWDSCAN) == 1, strString, "\")
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfDelBackslashR (strString)
Return ItemRemove (-(StrIndex (strString, "\", 0, @BACKSCAN) == StrLen (strString)), strString, "\")
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------



; Test.

strString = "\a"
str11 = udfDelBackslashL (strString) ; "a"

strString = "a\"
str12 = udfDelBackslashL (strString) ; "a\"

strString = "a\"
str21 = udfDelBackslashR (strString) ; "a"

strString = "\a"
str22 = udfDelBackslashR (strString) ; "\a"

:CANCEL
Exit