Generate String Literal #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The basic algorithm would be to place begin and end markers around the string and escape special characters. However we want it to be e general solution so we need to be able to configure this
and when you think about it then especially the escaping part is not that easy.
Escapes
Let's start with considering classic C++ strings the escape rules are fairly simple but there are actual three different escapes.
So when converting to escape there are three types of conversions to perform.
Do other languages need something else?
Quote's
Commonly use single or double quotes with single line literals. Some languages allow for multiline string literals with more complex begin and end markers.
Needed by #18
ConvertToMultiLineCString does most (all?) of this for atleast c/cpp possible good bases for more advanced implementation.