bypass or override the backslash
I'm working on a DateTimelibrary in java to use in a basic4android project. One of the things I worked on is the DateTimeformat and it's escape character, the backslash. Now normally you could say something like "\s" and it would print "s" instead of the seconds. My boss wants me to keep this in the same way, typing one backslash to get the character after that. What I do for all the other dateformat things is I send the string to a seperate class where it uses substring and with a switch sees what it has to do (e.g. for "HH" write hours in a 24 hour format with extra 0 if it's lower than 10). Now I can pass a backslash, without doubling it for the compiler not to throw an error saying it's not a recongized escape sequence.
I know I could do a double backslash to pass a single one, but my boss doesn't want this, nor does he want me to use another character than backslash. I think it's impossible, but he keeps telling me it is and I should keep thinking about it.
anyone who can help me?
Re: bypass or override the backslash
Moved from New to Java. Lets keep all Android related question in one place.