CSplitpath:Merge CSplitpath:SetDir

CSplitpath:new


The new method creates an instance of the CSplitpath class. Note that the object can also be created using new_splitpath.

Note: This method's name uses all lower case to present it as the analog of the C++ new operator. Generally, the names of class methods begin with an uppercase letter but new and delete are different.

Syntax

S = CSplitpath:new()

 

bullet.gif    Creates an empty CSplitpath object. When using this constructor, you cannot split the path until you asign a string to be split using the Set methods such as Split (which sets the entire path).

S = CSplitpath:new( sString )

bullet.gif    Creates a CSplitpath object ready to be split or otherwise manipulated. Using this constructor, SetPath is not needed unless you want to change the path being split.

bullet.gif    sString is the string to be split.

bullet.gif    On failure, nil is returned.

Example

 

S = CSplitpath:new( sPath )

-- create a new CSplitpath for the string sPath

  ...

-- other uses of the class go here, between new and delete.

S:delete()

-- deletes the object and its associated memory.

Related Topics

CSplitpath class, delete, Split, Merge, new_splitpath


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.