<-- Previous || Up || Next -->

Combine Prefix And Extension Function
File Names Class

Public Function CombinePrefixAndExtension( _
      ByVal vPrefix As Variant _
    , ByVal vExtension As Variant _
    ) As Variant

Combine the prefix and extension portions of a file name.
In the file name "WIN.INI", "WIN" if the prefix and "INI" is the extension.

Examples:
    CombinePrefixAndExtension("",     "")     = ""
    CombinePrefixAndExtension("",     "INI")  = ".INI"
    CombinePrefixAndExtension("",     ".INI") = ".INI"
    CombinePrefixAndExtension("WIN",  "")     = "WIN"
    CombinePrefixAndExtension("WIN",  "INI")  = "WIN.INI"
    CombinePrefixAndExtension("WIN",  ".INI") = "WIN.INI"
    CombinePrefixAndExtension("WIN.", "")     = "WIN"
    CombinePrefixAndExtension("WIN.", "INI")  = "WIN.INI"
    CombinePrefixAndExtension("WIN.", ".INI") = "WIN.INI"
See also:
    CombineDriveAndPath Function
    CombinePathAndFile Function
    SeparatePrefixAndExtension Function
vPrefix: The prefix portion of the file name--everything to the left of the extension (if any extension). Function returns Null if vPrefix is Null or cannot be fixed-up to a string.
vExtension: The extension portion of the file name--the trailing string past the last period (.) that usually specifies the type of data in the file or the application associated with the data in the file. Function returns Null if vExtension is Null or cannot be fixed-up to a string.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.