String (String s, boolean isSingleLine, boolean forInjection) { final StringBuilder builder = new StringBuilder(); escapeStringCharacters(s.length(), s, isSingleLine ? "'" : "", isSingleLine, true, builder); if (!forInjection) { unescapeCharacters(builder, isSingleLine ? "$\"" : "$'\"", !isSingleLine); } if (!isSingleLine) escapeLastSymbols(builder, '\''); return builder.toString(); }