String (String s, boolean forGString) { if (forGString) { if (s.contains("\n") || s.contains("\r")) { return TRIPLE_DOUBLE_QUOTES + s + TRIPLE_DOUBLE_QUOTES; } else { return DOUBLE_QUOTES + s + DOUBLE_QUOTES; } } else { if (s.contains("\n") || s.contains("\r")) { return TRIPLE_QUOTES + s + TRIPLE_QUOTES; } else { return QUOTE + s + QUOTE; } } }