I have a string:
str="D\\projects\\myown\\java"
I assigned this string to two variables like:
str1=str
str2=str
After I did the below operation:
idgb1=str1.gsub!("\\","_")
I get str1
as D_projects_myown_java
and str2
is the same. why does this happen? I don't want str2
to change its value.