English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

My background's mainly in C/C++/Java. I'm working on some .JS and .JSP files and I have a var, let's say <%=filename%> that has backslashes in it. They're getting converted to chars instead of being maintained. Is there a func that will take a var string "C:\doc" and maintain it as "C:\\doc" or do I have to walk the string by hand?

2006-12-19 08:57:00 · 1 answers · asked by T J 6 in Computers & Internet Programming & Design

1 answers

You won't have to walk it, but you should use the string find function to find the slashes and insert another slash in that space. Then you might remove the string up to that point using the substr method and search again.

2006-12-19 09:16:22 · answer #1 · answered by Githlar 2 · 0 0

fedest.com, questions and answers