Simplicty and flexibility!


Function::String

StringEscape
StringEscape(String)
StringEscape("/'This will appear in quotes/'./CR/TBThis will be show on new line and one tab in")


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)

Parameters


String: Including codefied "illegal" characters as above.

Returns/Result


String with parsed letters.

Examples


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.

Reference

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.

See Also


Chr()
ExecDQL()
ConCat()
SelectionFilter()
MemoCopy()
WriteToFile()

On the forum about StringEscape

Escape in DataEase 8 NEW FUNCTIONALITY! Chr() and StringEscape()

Dear Gorge.Your contributions to the "enlightenment" of the DataEase user base in invaluable. We need these pointers to get the message out there about challenges and solutions.First on a happy note...he,he.Several of our devel...

Product: Dataease [{8}]FIVE. Written by DataEase 22/06/15 at 09:09:47

Re:Escape in DataEase 8 NEW FUNCTIONALITY! Chr() and StringEscape()

Oh, thanks, as a long time fora user (and formerly usenet user) I really think sharing information is the basis in the IT. I hope not bothering too much with my constant questions. Anyway, now everything works like a charm....

Product: Dataease [{8}]FIVE. Written by George Washington 22/06/15 at 11:53:44

Re:Re:Escape in DataEase 8 NEW FUNCTIONALITY! Chr() and StringEscape()

No BOTHER at all! We can only reply if people as the question.The more things get put out there the easier it if for everyone to pick it out and use it.There is so much new stuff in DE8.x so we need to keep on "harping" to get it all o...

Product: Dataease [{8}]FIVE. Written by DataEase 22/06/15 at 12:16:35

StringReplace stupport StringEscape

Simples ;-)All string functions in DataEase 8.5 support StringEscape.This means that y...

Product: Dataease [{8}]FIVE. Written by DataEase 02/07/15 at 09:15:35

On the blog about StringEscape


dg3_HelpView