trimAccessHyperlink(str)
Last updated June 25, 2008
Version: 0 | Requires: CF5 | Library: StrLib
Description:
MS Access stores hyperlink information like: www.KomputerMan.com#http://www.KomputerMan.com#. This tag removes the second part of that data leaving you with just www.KomputerMan.com.
Return Values:
Returns a string.
Example:
<cfsavecontent variable="myString">
www.KomputerMan.com#http://www.KomputerMan.com#
</cfsavecontent>
<cfoutput>#trimAccessHyperlink(mystring)#</cfoutput>
Parameters:
Name | Description | Required |
---|---|---|
str | String to parse. | Yes |
Full UDF Source:
/**
* Convert an Access hyperlink field to text.
*
* @param str String to parse. (Required)
* @return Returns a string.
* @author Kurtis D. Leatham (KDL@KomputerMan.com)
* @version 0, June 25, 2008
*/
function trimAccessHyperlink(str) {
var endTag = "";
var extract = "";
str = trim(str);
endTag = findNoCase("##", str);
if (endTag gt 0) {
endTag = endTag - 1;
extract = left(str, endTag);
} else {
extract = str;
}
return trim(extract);
}
Search CFLib.org
Latest Additions
Raymond Camden added
QueryDeleteRows
November 04, 2017
Leigh added
nullPad
May 11, 2016
Raymond Camden added
stripHTML
May 10, 2016
Kevin Cotton added
date2ExcelDate
May 05, 2016
Raymond Camden added
CapFirst
April 25, 2016