-
Re: String escapes
You don't have to escape the left-parenthesis character in a string. You
only have to escape the double-quote character and the backslash character,
in both cases by preceding them with a backslash. All other characters go
into the string as themselves alone.
So if you want to write a string composed of the two characters double-quote
and left-parenthesis, you write it like this:
"\"("
PC2
"Chad Gorshing" <gorshing_c@hotmail.com> wrote in message
news:3aeeceb8$1@news.devx.com...
>
> First off I just wanted to say that I hit enter instead of tab, by
mistake.
>
> My question is I'm wanting to escape the ( character.
>
> I'm wanting to test to see if a string (called value) starts with "(
>
> so this is what I have that doesn't work
>
> if(value.startsWith("\"\(")
> file://Do stuff
>
> Looks pretty bad to me.
> Any help would be appreciated
> Thanks
>
> Chad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks