Jump to content

replace function error replacing backslashes


photo

Recommended Posts

Hi,

the problem is when I want to replace backslashes in a string:

string s= "a//a/b/c\\d";
s= replace(s,"\\","/");

I get the following error:

09:33:01 s= replace(s,"\\","/");
09:33:01 beholder/worlds/manage2d.cpp:117: Interpreter::get_extern_function(): can't find "replace" function with 2 arguments

I have tried these other expressions:

s= replace(s,"c\\","/"); //Error
s= replace(s,"\\d","/"); //Ok

 

Best regards,

Iván.

Link to comment
  • 4 weeks later...
×
×
  • Create New...