On Thu, 27 Nov 2014 18:05:37 +0000 Suliman via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> 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 > can get error like: > path ~= foo.txt > "C:\\folder\\namefoo.txt" > instead of > "C:\\folder\\name\\foo.txt" > > what is the best way to add tail slash if it's not exists? > see std.path, it contains alot of useful things.
signature.asc
Description: PGP signature