comparison src/main/kotlin/name/blackcap/passman/See.kt @ 9:72619175004e

Fix issues found in testing.
author David Barts <n5jrn@me.com>
date Sat, 01 Oct 2022 09:57:23 -0700
parents ad997df1f560
children
comparison
equal deleted inserted replaced
8:698c4a3d758d 9:72619175004e
7 private val ALWAYS_BAN = setOf<Char>(DELIM, '\\') 7 private val ALWAYS_BAN = setOf<Char>(DELIM, '\\')
8 private val FORBIDDEN = setOf<Byte>(Character.CONTROL, Character.FORMAT, 8 private val FORBIDDEN = setOf<Byte>(Character.CONTROL, Character.FORMAT,
9 Character.SURROGATE, Character.PRIVATE_USE, Character.UNASSIGNED, 9 Character.SURROGATE, Character.PRIVATE_USE, Character.UNASSIGNED,
10 Character.SPACE_SEPARATOR) 10 Character.SPACE_SEPARATOR)
11 private val STD_ESC_MAP = mapOf<Char, Char>('\t' to 't', '\b' to 'b', '\n' to 'n', 11 private val STD_ESC_MAP = mapOf<Char, Char>('\t' to 't', '\b' to 'b', '\n' to 'n',
12 '\r' to 'r', '\u000c' to 'f', '"' to '"', '\\' to '\\') 12 '\r' to 'r', '"' to '"', '\\' to '\\')
13 13
14 fun see(input: String): String { 14 fun see(input: String): String {
15 val accum = Formatter() 15 val accum = Formatter()
16 accum.format("%c", DELIM) 16 accum.format("%c", DELIM)
17 for (ch in input) { 17 for (ch in input) {