This page shows samples of how the ReplaceMSChars function for ColdFusion works.
|
|||
| FUNCTION | value | RETURNS | DISPLAY |
|---|---|---|---|
| ReplaceMSChars( str, blnNewLineToBR, blnGTLTtoHTML, blnSingleQuoteToTwoSingleQuotes, strBullet ) | Returns String | ||
| ReplaceMSChars(valueA) | Great for garage and basement flooring, play rooms, car shows, and more. Our modular “Corner Tiles” are designed to keep you and your machine up and away from dirt, mud and liquids, giving you a professional, clean work area. Installation is a “SNAP”! Simply snap together to form any size custom floor. |
Great for garage and basement flooring, play rooms, car shows, and more. Our modular “Corner Tiles” are designed to keep you and your machine up and away from dirt, mud and liquids, giving you a professional, clean work area. Installation is a “SNAP”! Simply snap together to form any size custom floor. |
Great for garage and basement flooring, play rooms, car shows, and more. Our modular “Corner Tiles” are designed to keep you and your machine up and away from dirt, mud and liquids, giving you a professional, clean work area. Installation is a “SNAP”! Simply snap together to form any size custom floor. |
| ReplaceMSChars(valueA,0) | Great for garage and basement flooring, play rooms, car shows, and more. Our modular “Corner Tiles” are designed to keep you and your machine up and away from dirt, mud and liquids, giving you a professional, clean work area. Installation is a “SNAP”! Simply snap together to form any size custom floor. |
Great for garage and basement flooring, play rooms, car shows, and more. Our modular “Corner Tiles” are designed to keep you and your machine up and away from dirt, mud and liquids, giving you a professional, clean work area. Installation is a “SNAP”! Simply snap together to form any size custom floor. |
Great for garage and basement flooring, play rooms, car shows, and more. Our modular “Corner Tiles” are designed to keep you and your machine up and away from dirt, mud and liquids, giving you a professional, clean work area. Installation is a “SNAP”! Simply snap together to form any size custom floor. |
| ReplaceMSChars(valueB) | 4 Foot or ¼ Cord Wood Rack: also known as ½ face cord. This rack assembles with only 8 bolts (included). Great for garages, porches or patio! |
4 Foot or ¼ Cord Wood Rack: also known as ½ face cord. This rack assembles with only 8 bolts (included). Great for garages, porches or patio! |
4 Foot or ¼ Cord Wood Rack: also known as ½ face cord. This rack assembles with only 8 bolts (included). Great for garages, porches or patio! |
| ReplaceMSChars(valueC) | Features: • Mounts on ceiling or wall • Adjustable hanging hook swivels 360 degrees and folds down when not in use Size: 20' cord Color: Yellow |
Features:<br><li> Mounts on ceiling or wall<br><li> Adjustable hanging hook swivels 360 degrees and folds down when not in use<br><br>Size: 20'' cord<br>Color: Yellow |
Features: Size: 20'' cord Color: Yellow |
| ReplaceMSChars(valueC,1,1,0) | Features: • Mounts on ceiling or wall • Adjustable hanging hook swivels 360 degrees and folds down when not in use Size: 20' cord Color: Yellow |
Features:<br><li> Mounts on ceiling or wall<br><li> Adjustable hanging hook swivels 360 degrees and folds down when not in use<br><br>Size: 20' cord<br>Color: Yellow |
Features: Size: 20' cord Color: Yellow |
| ReplaceMSChars(valueC,1,1,1,"-") | Features: • Mounts on ceiling or wall • Adjustable hanging hook swivels 360 degrees and folds down when not in use Size: 20' cord Color: Yellow |
Features:<br>- Mounts on ceiling or wall<br>- Adjustable hanging hook swivels 360 degrees and folds down when not in use<br><br>Size: 20'' cord<br>Color: Yellow |
Features: |
Download ReplaceMSChars() function:
<!--- ============ REPLACEMSCHARS ============ ---> <CFFUNCTION name="ReplaceMSChars" returnType="string" output="no" hint="Microsoft Office likes to replace certain characters with others for better readability with it's AutoCorrect and AutoFormat features. This function returns the original characters to a string. This is useful for updating data that has been entered from Word or Excel."> <!--- ##################################################### ## Author: George Jaros ## ## Script Name: ColdFusion ReplaceMSChars Function ## ## Copyright 2006 George Jaros & Web 2 Market ## ## www.georgejaros.com www.web2market.com ## ## This code may be replicated as long as this ## ## header statement is included. The Instructions ## ## below may be removed. ## ##################################################### ---> <!--- Microsoft Office likes to replace certain characters with others for better readability. This function returns the original characters to a string. This is useful for updating data that has been entered from Word or Excel. ---> <CFARGUMENT name="str" type="string" required="No" default=""> <CFARGUMENT name="blnNewLineToBR" type="boolean" required="No" default=1><!--- Should New Line characters be converted to <br>?" ---> <CFARGUMENT name="blnGTLTtoHTML" type="boolean" required="No" default=1><!--- Should > and < characters be converted to HTML Characters?" ---> <CFARGUMENT name="blnSingleQuoteToTwoSingleQuotes" type="boolean" required="No" default=1><!--- Should a single quote be converted to two single quotes? ' to '' " ---> <CFARGUMENT name="strBullet" type="string" required="No" default="<li>"><!--- Character(s) that bullets should be converted to." ---> <CFIF blnGTLTtoHTML> <CFSET str = Replace(str,Chr(60),"<","ALL")> <CFSET str = Replace(str,Chr(62),">","ALL")> </CFIF> <CFSET str = Replace(str,Chr(130),",","ALL")><!--- ---> <CFSET str = Replace(str,Chr(133),"...","ALL")><!--- ellipses to ... ---> <CFSET str = Replace(str,Chr(136),"^","ALL")> <CFSET str = Replace(str,Chr(139),"<","ALL")> <CFIF blnSingleQuoteToTwoSingleQuotes> <CFSET str = Replace(str,Chr(39),Chr(39) & Chr(39),"ALL")> <CFSET str = Replace(str,Chr(145),Chr(39) & Chr(39),"ALL")><!--- Left Single Quote to ' ---> <CFSET str = Replace(str,Chr(146),Chr(39) & Chr(39),"ALL")><!--- Right Single Quote to ' ---> <CFELSE> <CFSET str = Replace(str,Chr(145),Chr(39),"ALL")><!--- Left Single Quote to ' ---> <CFSET str = Replace(str,Chr(146),Chr(39),"ALL")><!--- Right Single Quote to ' ---> </CFIF> <CFSET str = Replace(str,Chr(147),Chr(34),"ALL")><!--- Left Double Quote to " ---> <CFSET str = Replace(str,Chr(148),Chr(34),"ALL")><!--- Right Double Quote to " ---> <CFSET str = Replace(str,Chr(149),strBullet,"ALL")><!--- Bullet to strBullet ---> <CFSET str = Replace(str,Chr(150),"-","ALL")><!--- Dash to hyphen ---> <CFSET str = Replace(str,Chr(151),"-","ALL")><!--- Large Dash to hyphen ---> <CFSET str = Replace(str,Chr(153),"™","ALL")><!--- Trademark to HTML Characters ---> <CFSET str = Replace(str,Chr(155),">","ALL")> <CFSET str = Replace(str,Chr(188),"¼","ALL")><!--- 1/4 Fraction to HTML Characters ---> <CFSET str = Replace(str,Chr(189),"½","ALL")><!--- 1/2 Fraction to HTML Characters ---> <CFSET str = Replace(str,Chr(190),"¾","ALL")><!--- 3/4 Fraction to HTML Characters ---> <CFIF blnNewLineToBR> <CFSET str = Replace(str,Chr(10),"<br>","ALL")> </CFIF> <CFRETURN str> </CFFUNCTION> <!--- ============ END REPLACEMSCHARS ============ ---> |
|||