digitalmars.D.learn - Difference between back (`) and double (") quoted strings
- Bahman Movaqar (7/7) Sep 12 2015 Is there any or they are just simply syntactically equivalent?
- NX (14/16) Sep 12 2015 What if I told you, you should search the official reference
- Bahman Movaqar (13/16) Sep 12 2015 I did search the net for terms such as "d lang back quoted string" or "d
- Adam D. Ruppe (8/10) Sep 12 2015 Searching is kinda hard, so I encourage people to ask if
- =?UTF-8?Q?Ali_=c3=87ehreli?= (7/9) Sep 18 2015 I realized that there was no index entry for back tick in my book. I've
- BBasile (12/14) Sep 18 2015 it's like a raw string (prefixed with a r) so there is escaped
Is there any or they are just simply syntactically equivalent? Are there any official docs on this? --=20 Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
Sep 12 2015
On Saturday, 12 September 2015 at 08:13:33 UTC, Bahman Movaqar wrote:Is there any or they are just simply syntactically equivalent? Are there any official docs on this?What if I told you, you should search the official reference before asking such things in the forum? http://dlang.org/lex.html#WysiwygString Wysiwyg: What you see is what you get <code> writeln(`\asd"fg"hj hmph'`); </code> <output> \asd"fg"hj haha' </output>
Sep 12 2015
On 09/12/2015 12:52 PM, NX wrote:What if I told you, you should search the official reference before asking such things in the forum?I did search the net for terms such as "d lang back quoted string" or "d lang multi line string" or "d lang string interpolation" before asking here. However the term "Wysiwyg string" didn't occur to my mind and from what I could gather from the net and the test programs I wrote, I couldn't determine the difference between `-string and "=string. Hence I decided to ask people here.http://dlang.org/lex.html#WysiwygStringThanks for the help. -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
Sep 12 2015
On Saturday, 12 September 2015 at 08:22:03 UTC, NX wrote:What if I told you, you should search the official reference before asking such things in the forum?Searching is kinda hard, so I encourage people to ask if something doesn't come up quickly. And then we need to be sure to always answer because their question might be the thing that comes up on some future user's search, and if they see "google it", their reaction might be "what the &^&*%^ do you think brought me here?!?!?!" (at least that's my reaction!)
Sep 12 2015
On 09/12/2015 01:13 AM, Bahman Movaqar wrote:Is there any or they are just simply syntactically equivalent? Are there any official docs on this?I realized that there was no index entry for back tick in my book. I've just added that and provided an Index section for the web version of the book. Click "Index (beta)" below to see a currently-ugly but hopefully useful Index section: http://ddili.org/ders/d.en/ Ali
Sep 18 2015
On Saturday, 12 September 2015 at 08:13:33 UTC, Bahman Movaqar wrote:Is there any or they are just simply syntactically equivalent? Are there any official docs on this?it's like a raw string (prefixed with a r) so there is escaped char: r"\": correct token for a string, terminal " is not escaped `\`: correct token for a string, terminal ` is not escaped "\": invalid token for a string, " is escaped so it's usefull on Windows for example, if a litteral string contains a path, instead of "C:\\folder\\file" you can type `C:\folder\file`
Sep 18 2015
On Friday, 18 September 2015 at 09:34:38 UTC, BBasile wrote:On Saturday, 12 September 2015 at 08:13:33 UTC, Bahman Movaqar wrote:there **NO** escaped chars...godamnit typo.Is there any or they are just simply syntactically equivalent? Are there any official docs on this?it's like a raw string (prefixed with a r) so there is escaped char:
Sep 18 2015
On Friday, 18 September 2015 at 09:35:53 UTC, BBasile wrote:On Friday, 18 September 2015 at 09:34:38 UTC, BBasile wrote:12 September 2015, '6 days ago', mh haven't seen this initially. That's embarassing.On Saturday, 12 September 2015 at 08:13:33 UTC, Bahman Movaqar wrote:there **NO** escaped chars...godamnit typo.Is there any or they are just simply syntactically equivalent? Are there any official docs on this?it's like a raw string (prefixed with a r) so there is escaped char:
Sep 18 2015