Re: Best way to add slash to tail of the path

2014-11-27 Thread Evil Satanson via Digitalmars-d-learn
On Thursday, 27 November 2014 at 20:52:26 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 27 Nov 2014 20:42:31 + Suliman via Digitalmars-d-learn wrote: Could you quote for me part of docs where it's written? I really can't understand about what you are taking. right here: http://dlan

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
thanks! I understood!

Re: Best way to add slash to tail of the path

2014-11-27 Thread ketmar via Digitalmars-d-learn
On Thu, 27 Nov 2014 20:42:31 + Suliman via Digitalmars-d-learn wrote: > Could you quote for me part of docs where it's written? I really > can't understand about what you are taking. right here: http://dlang.org/phobos/std_path.html#buildPath do you see examples section there? you don't even

Re: Best way to add slash to tail of the path

2014-11-27 Thread Daniel Kozak via Digitalmars-d-learn
try first few sentences and looked at the example ;) Dne Thu, 27 Nov 2014 21:42:31 +0100 Suliman via Digitalmars-d-learn napsal(a): Could you quote for me part of docs where it's written? I really can't understand about what you are taking. -- Vytvořeno poštovní aplikací Opery: http://w

Re: Best way to add slash to tail of the path

2014-11-27 Thread Daniel Kozak via Digitalmars-d-learn
Dne Thu, 27 Nov 2014 21:20:24 +0100 Suliman via Digitalmars-d-learn napsal(a): take a second look then. ;-) you'll find `buildPath()` here too. Not better: string foo = "D:/code/txtDownloader"; writeln(foo); foo = foo.buildPath; foo ~= "config.txt";

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
Could you quote for me part of docs where it's written? I really can't understand about what you are taking.

Re: Best way to add slash to tail of the path

2014-11-27 Thread ketmar via Digitalmars-d-learn
On Thu, 27 Nov 2014 20:20:24 + Suliman via Digitalmars-d-learn wrote: > >take a second look then. ;-) you'll find `buildPath()` here too. > Not better: > > string foo = "D:/code/txtDownloader"; > > writeln(foo); > foo = foo.buildPath; > foo ~= "config.txt"; > w

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
take a second look then. ;-) you'll find `buildPath()` here too. Not better: string foo = "D:/code/txtDownloader"; writeln(foo); foo = foo.buildPath; foo ~= "config.txt"; writeln(foo); Running .\txtdownloader.exe D:/code/txtDownloader D:/code/txtDownloa

Re: Best way to add slash to tail of the path

2014-11-27 Thread ketmar via Digitalmars-d-learn
On Thu, 27 Nov 2014 20:02:40 + Suliman via Digitalmars-d-learn wrote: > > see std.path, it contains alot of useful things. > I looked there, but found only buildNormalizedPath, but it's not > for such situation... take a second look then. ;-) you'll find `buildPath()` here too. signature.a

Re: Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
see std.path, it contains alot of useful things. I looked there, but found only buildNormalizedPath, but it's not for such situation...

Re: Best way to add slash to tail of the path

2014-11-27 Thread ketmar via Digitalmars-d-learn
On Thu, 27 Nov 2014 18:05:37 + Suliman via Digitalmars-d-learn wrote: > Sometimes it's path string may do not have tail slash of the path > Compare: > > string path = "C:\\folder\\name" > string path = "C:\\folder\\name\\" > > in case if I need to append file name to path to get full path I

Best way to add slash to tail of the path

2014-11-27 Thread Suliman via Digitalmars-d-learn
Sometimes it's path string may do not have tail slash of the path Compare: string path = "C:\\folder\\name" string path = "C:\\folder\\name\\" in case if I need to append file name to path to get full path I can get error like: path ~= foo.txt "C:\\folder\\namefoo.txt" instead of "C:\\folder\\