Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Location
    Göttingen, Germany
    Posts
    77

    Suggestion: new function String.AppendPath

    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.

    Code:
    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

  2. #2
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834
    Thanks for the suggestion. REF: 18929

    In case you weren't aware, you can also perform string concatenation using ".." instead of using actions.
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts