I am trying to create a filename based on a window title.
I can get the window title with:
std::string filename = w_title;
but the window title will always have (in different positions) these symbols in it - ":", ",", "$"
I want to change the colon to a ".", the "/" to a "-", and the $ to "" so that I end up with a valid filename, otherwise the file never gets created.
I have tried looking a various exmples of str.replace but have not been successful.
Any ideas?
Thanks.