need a little help please with a string problem

BlitzMax Forums/BlitzMax Beginners Area/need a little help please with a string problem

wad(Posted 2014) [#1]
hi guys n gals i have run into a little issue ......

here it is as follows

A$="J:\Vsts in here\synth1\patches\"

right i know it looks simple but what i want to do is make that string look like

A$="J:\\Vsts in here\\synth1\\patches\\"

i want to import the extra "\" into the string i have tried to create an array and sort each character into it but when i try to "slice it in" so to speak by detecting the 1st "\" then moving the loop on 1 and adding it it takes away the next character can someone please enlighten me with an easy way of achieving this :)

cheers guys

Lee


GfK(Posted 2014) [#2]
A = Replace(A,"\","\\")



Brucey(Posted 2014) [#3]
Or
A = A.Replace("\","\\")



wad(Posted 2014) [#4]
ahhhhh ty boys will try that when I get home

nice one

did not know there was a command for that :-)

lee


wad(Posted 2014) [#5]
cheers worked a treat thanks gfk and brucey :)