• Advertisement

Archived

This topic is now archived and is closed to further replies.

Strings - Find And Replace

This topic is 5491 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Basically, i need a string function that will replace every occurence of a character in a string with another. More specifically: I need to replace the ''/'' in a dir string e.g. "F:/Music/Anything.mp3" with "//" so it can be used as a file pointer. I was wondering if there was an str command to do this, maybe something along the lines of: str...(MyString, "/", "//"); I''ve looked through MSDN and havn''t been able to find anything. Can anyone help?

Share this post


Link to post
Share on other sites
Advertisement
You can use forward (/) slashes as file name seperators, you don''t need a double slash. It''s only with back (\) slashes because they start escape sequences.

I don''t think there is a find and replace per se, but one of the functions like strstr might help out.

-Mezz

Share this post


Link to post
Share on other sites

  • Advertisement