To allow users to include reference to certain "forbidden" characters in a DE string and return the parsed result.
Characters include is:
" = /'
CR = /CR (New line)
TAB=/TB (Tab)
Tags are case sensitive, so /cr would not be escaped
From 8.6 Onwards you can also use:
" =\/'
CR = \CR (New line)
TAB=\TB (Tab)
String: Including codefied "illegal" characters as above.
Exanple 1:
Code: StringEscape("/'This will appear in quotes/'./CR/TBThis will be show on new line and one tab in")
Return:
"This will appear in quotes"
This will show on new line and one tab in.
There is an historical problem with including certain characters in DataEase strings, especially in derivations etc. " in particular has been difficult and prior to Version 8.0 there was no good way of building strings or passing strings containing this character in DE. In DE8.0 we got CHR() which made it possible to build strings including " by using CHR(34) and concatenate a string. However this is rather awkward, and particularly when using functions that demand a lot of " etc.
StringEscape() was devised so the developer can parse the entire string in one go without the need of concatenation etc.
However bear in mind that StringEscape() is the fallback function, this functionality has now been included in ALL string functions, so you will now be able to use the switches directly in functions like ExecDQL(), Concat(), SelectionFilter() etc.
Chr()
ExecDQL()
ConCat()
SelectionFilter()
MemoCopy()
WriteToFile()
Product: Dataease [{8}]FIVE. Written by DataEase 22/06/15 at 09:09:47
Product: Dataease [{8}]FIVE. Written by George Washington 22/06/15 at 11:53:44
Product: Dataease [{8}]FIVE. Written by DataEase 22/06/15 at 12:16:35