Results 1 to 2 of 2
Thread: bypass or override the backslash
- 04-06-2012, 01:32 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 1
- Rep Power
- 0
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?
- 04-06-2012, 02:31 PM #2
Similar Threads
-
trying to bypass activation
By saketh321 in forum New To JavaReplies: 8Last Post: 08-21-2010, 09:57 PM -
Trying to bypass proxy
By dipanshu.agrawal in forum NetworkingReplies: 2Last Post: 04-16-2010, 02:46 PM -
How do you Use Backslash as a Delimiter?
By Mobius-1 in forum New To JavaReplies: 3Last Post: 12-14-2009, 12:39 AM -
Backslash, File directories, and streams
By rp181 in forum Advanced JavaReplies: 4Last Post: 10-15-2009, 09:54 AM -
How to handle \ (backslash) in regular expressions
By federal102 in forum New To JavaReplies: 1Last Post: 11-02-2008, 01:33 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks