Backslash versus foreslash
#6
I was thinking more along the lines of something simple such as:

Code: (Select All)
foo$ = "./mydir/foo.txt"
Print foo$
Print setSlash$(foo$)
foo2$ = ".\mydir\foo.txt"
Print foo2$
Print setSlash$(foo2$)
foo3$ = "./mydir\foo.txt"
Print foo3$
Print setSlash$(foo3$)





Function setSlash$ (text$)
    temp$ = text$
    $If WIN Then
        desiredSlash$ = "\"
        badSlash$ = "/"
    $Else
            desiredSlash$ ="/"
            badSlash$ = "\"
    $End If
    Do
        p = InStr(temp$, badSlash$)
        If p Then Mid$(temp$, p, 1) = desiredSlash$
    Loop Until p <= 0
    setSlash$ = temp$
End Function
Reply


Messages In This Thread
Backslash versus foreslash - by TerryRitchie - 01-10-2023, 05:40 PM
RE: Backslash versus foreslash - by SMcNeill - 01-10-2023, 06:21 PM
RE: Backslash versus foreslash - by mnrvovrfc - 01-10-2023, 06:34 PM
RE: Backslash versus foreslash - by Fifi - 01-11-2023, 05:20 AM
RE: Backslash versus foreslash - by SMcNeill - 01-10-2023, 06:43 PM
RE: Backslash versus foreslash - by TerryRitchie - 01-10-2023, 06:50 PM
RE: Backslash versus foreslash - by SMcNeill - 01-10-2023, 06:54 PM
RE: Backslash versus foreslash - by TerryRitchie - 01-10-2023, 07:17 PM
RE: Backslash versus foreslash - by mdijkens - 01-11-2023, 08:24 AM
RE: Backslash versus foreslash - by DSMan195276 - 01-11-2023, 09:38 PM
RE: Backslash versus foreslash - by DSMan195276 - 01-11-2023, 10:15 PM
RE: Backslash versus foreslash - by mnrvovrfc - 01-12-2023, 02:12 AM
RE: Backslash versus foreslash - by TerryRitchie - 01-12-2023, 05:16 AM
RE: Backslash versus foreslash - by Fifi - 01-14-2023, 07:59 AM
RE: Backslash versus foreslash - by TerryRitchie - 01-16-2023, 03:53 AM



Users browsing this thread: 4 Guest(s)