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
Shawn Porter added
DeMoronize
2 hour(s) ago
Chris Carey added
readPropertiesFi...
1 day(s) ago
Randy Johnson added
lastDayofWeek
3 day(s) ago
Frank Marion added
sitemapPing
7 day(s) ago
Top Rated
QuickSort
Rated 5.0, 3 time(s)
indentXml
Rated 5.0, 3 time(s)
queryColumnsToSt...
Rated 5.0, 3 time(s)
generateSsccAsn
Rated 5.0, 3 time(s)