UnQuote ( string )
Reverse Quoted Text (with FMP's Quote function) to original Tex
Average rating: 3.5 (2 votes) Log in to vote
Vincent_L MyCompany https://community.filemaker.com/people/Vincent_L |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function aims to replace the Evaluate functions, to "UnQuote" Text returned by the quote function. It's much much much faster than Evaluate (which can be ultra slow : 2h16, for 17,8 MB of Text)
So Evaluate(Quote(string))=UnQuote(Quote(string)), so we're back to the original contents of the string
It has been made by comparing the real output of Quote() on the first 65 536 unicode chars . Which determined that Quote does :
Replaces " by \", and their smartquote versions
Replaces ¶ by \¶
Replaces char(13), ie carriage returns, by char(182) pilcrow, wich is like ¶, but not exactly -> so we need to protect real pilcrows that are converted to \¶ before re-replacing ¶ to char(13)
Comments
Bruce Robertson Apr 10, 2018 |
||
Unreliable results if last character in string is a quote. | ||
Bruce Robertson Apr 10, 2018 |
||
Just use it this way then. Let( result = unquote( myString & "X"); left( result; length( result) -1) |
||
Vincent_L, France Apr 11, 2018 |
||
v.1.0.2 Released with corrections and cleanup. Thanks for user19752, David and Bruce for their help |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.