ripExt(name)
Last updated July 18, 2006
Version: 1 | Requires: ColdFusion 5 | Library: FileSysLib
Description:
This function (which is just a regular expression) strips off the extension from a filename. Dots within the filename are preserved.
Return Values:
Returns a string.
Example:
<cfoutput>#ripExt(filename)#</cfoutput>
Parameters:
| Name | Description | Required |
|---|---|---|
| name | Filename. | Yes |
Full UDF Source:
<cfscript>
/**
* Function returns filename without extension.
*
* @param name Filename. (Required)
* @return Returns a string.
* @author Richard (acdhirr@trilobiet.nl)
* @version 1, July 18, 2006
*/
function ripExt(name) {
return reReplace(arguments.name,"\.[^.]*$","");
}
</cfscript>
Search CFLib.org
Latest Additions
Robby Lansaw added
getComponentProp...
3 day(s) ago
Dave Anderson added
iniToStruct
25 day(s) ago
Dave Anderson added
deDupeArray
25 day(s) ago
Richard added
dice
27 day(s) ago
Top Rated
backupDatabase
Rated 5.0, 22 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)
highlightAndCrop
Rated 5.0, 4 time(s)