EncodeLocaleName writes the locale identifier in s to buf. Any dash characters are mapped to underscore characters. Underscore characters do not need to be quoted, and they are considered equivalent to dash characters by the CLDR standard: http://cldr.unicode.org/.
(buf *bytes.Buffer, s string)
| 186 | // need to be quoted, and they are considered equivalent to dash characters by |
| 187 | // the CLDR standard: http://cldr.unicode.org/. |
| 188 | func EncodeLocaleName(buf *bytes.Buffer, s string) { |
| 189 | for i, n := 0, len(s); i < n; i++ { |
| 190 | ch := s[i] |
| 191 | if ch == '-' { |
| 192 | buf.WriteByte('_') |
| 193 | } else { |
| 194 | buf.WriteByte(ch) |
| 195 | } |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | // EncodeSQLBytes encodes the SQL byte array in 'in' to buf, to a |
| 200 | // format suitable for re-scanning. We don't use a straightforward hex |
no outgoing calls
no test coverage detected
searching dependent graphs…