Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Yet Another Way to Duplicate Quotes in String

Question
Alexey Maslov · Oct 17, 2017

Yet Another Way to Duplicate Quotes in String

This small function is of great need sometimes. My solution is straightforward:


dupquote(str) ; duplicate quotes in str
    quit $replace(str,$char(34),$char(34,34))

I'm just curious whether other solutions exist. Is there some "standard" and/or quicker approach which I've just overlooked?

#Tips & Tricks #Caché

Source URL:https://community.intersystems.com/post/yet-another-way-duplicate-quotes-string