in atlas-postgres/src/main/scala/com/netflix/atlas/postgres/TextCopyBuffer.scala [67:89]
private def escapeAndPut(str: String): TextCopyBuffer = {
if (shouldEscapeValues) {
val n = str.length
var i = 0
while (i < n) {
str.charAt(i) match {
case '\b' => put("\\b")
case '\f' => put("\\f")
case '\n' => put("\\n")
case '\r' => put("\\r")
case '\t' => put("\\t")
case 0x0B => put("\\v")
case '"' => put("\\\"")
case '\\' => put("\\\\")
case c => put(c)
}
i += 1
}
this
} else {
put(str)
}
}