Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    5

    Grin String.Replace question

    I would like to use String.Replace to change all instances of "\" in a file path to "\\". This seems complicated by "\" being used to make a special character display as a literal, like in input masks.

    I haven't found a way to denote "\\" in my String.Replace action yet because of this. Is there a way to do this?

    On another note, I would ask Corey to please not delete my post, or if you do at least respond to my private messages in some way. I'm not a secondary account of another user.

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Code:
    sText = TextFile.ReadToString(_SourceFolder .. "\\text.txt");
    sText = String.Replace(sText, "\\", "\\\\", false)

  3. #3
    Join Date
    Mar 2004
    Posts
    5
    Great, thank you. I hadn't thought of trying multiple \'s.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts