diff options
Diffstat (limited to 'libgo/go/strconv/quote.go')
-rw-r--r-- | libgo/go/strconv/quote.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libgo/go/strconv/quote.go b/libgo/go/strconv/quote.go index 30b384df8e3..edba62954be 100644 --- a/libgo/go/strconv/quote.go +++ b/libgo/go/strconv/quote.go @@ -116,30 +116,30 @@ func AppendQuoteToASCII(dst []byte, s string) []byte { // rune. The returned string uses Go escape sequences (\t, \n, \xFF, \u0100) // for control characters and non-printable characters as defined by // unicode.IsPrint. -func QuoteRune(rune int) string { +func QuoteRune(r rune) string { // TODO: avoid the allocation here. - return quoteWith(string(rune), '\'', false) + return quoteWith(string(r), '\'', false) } // AppendQuoteRune appends a single-quoted Go character literal representing the rune, // as generated by QuoteRune, to dst and returns the extended buffer. -func AppendQuoteRune(dst []byte, rune int) []byte { - return append(dst, QuoteRune(rune)...) +func AppendQuoteRune(dst []byte, r rune) []byte { + return append(dst, QuoteRune(r)...) } // QuoteRuneToASCII returns a single-quoted Go character literal representing // the rune. The returned string uses Go escape sequences (\t, \n, \xFF, // \u0100) for non-ASCII characters and non-printable characters as defined // by unicode.IsPrint. -func QuoteRuneToASCII(rune int) string { +func QuoteRuneToASCII(r rune) string { // TODO: avoid the allocation here. - return quoteWith(string(rune), '\'', true) + return quoteWith(string(r), '\'', true) } // AppendQuoteRune appends a single-quoted Go character literal representing the rune, // as generated by QuoteRuneToASCII, to dst and returns the extended buffer. -func AppendQuoteRuneToASCII(dst []byte, rune int) []byte { - return append(dst, QuoteRuneToASCII(rune)...) +func AppendQuoteRuneToASCII(dst []byte, r rune) []byte { + return append(dst, QuoteRuneToASCII(r)...) } // CanBackquote returns whether the string s would be |