SetupJuggler
08-20-2009, 09:02 AM
Hi,
using SUF 8.1.1008.0
it would be nice to have a string function to append ("concatenates") two paths together and returns the result as a new string, like String.Concat. It would be nice not to think about leading or trailing backslashes when using variables.
resultPath = String.AppendPath( PathStart, PathToAppend )
-- sample
PathStart = "c:\\tmp";
PathToAppend = "folder";
resultPath = String.AppendPath( PathStart, PathToAppend )
-- resultPath = "c:\\tmp\\folder"
PathStart = "c:\\tmp\\";
PathToAppend = "\\folder";
resultPath = String.AppendPath( PathStart, PathToAppend )
-- resultPath = "c:\\tmp\\folder"
I know String.MakePath could do this with Filename set to the path to append, but String.AppendPath would be closer to the task to do.
Greetings,
Udo
using SUF 8.1.1008.0
it would be nice to have a string function to append ("concatenates") two paths together and returns the result as a new string, like String.Concat. It would be nice not to think about leading or trailing backslashes when using variables.
resultPath = String.AppendPath( PathStart, PathToAppend )
-- sample
PathStart = "c:\\tmp";
PathToAppend = "folder";
resultPath = String.AppendPath( PathStart, PathToAppend )
-- resultPath = "c:\\tmp\\folder"
PathStart = "c:\\tmp\\";
PathToAppend = "\\folder";
resultPath = String.AppendPath( PathStart, PathToAppend )
-- resultPath = "c:\\tmp\\folder"
I know String.MakePath could do this with Filename set to the path to append, but String.AppendPath would be closer to the task to do.
Greetings,
Udo