Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for QuoteRuneToASCII (0.52 sec)

  1. src/strconv/doc.go

    // The latter guarantees that the result is an ASCII string, by escaping
    // any non-ASCII Unicode with \u:
    //
    //	q := strconv.Quote("Hello, 世界")
    //	q := strconv.QuoteToASCII("Hello, 世界")
    //
    // [QuoteRune] and [QuoteRuneToASCII] are similar but accept runes and
    // return quoted Go rune literals.
    //
    // [Unquote] and [UnquoteChar] unquote Go string and rune literals.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  2. src/strconv/quote_test.go

    		}
    	}
    }
    
    func TestQuoteRuneToASCII(t *testing.T) {
    	for _, tt := range quoterunetests {
    		if out := QuoteRuneToASCII(tt.in); out != tt.ascii {
    			t.Errorf("QuoteRuneToASCII(%U) = %s, want %s", tt.in, out, tt.ascii)
    		}
    		if out := AppendQuoteRuneToASCII([]byte("abc"), tt.in); string(out) != "abc"+tt.ascii {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  3. src/strconv/quote.go

    // If r is not a valid Unicode code point, it is interpreted as the Unicode
    // replacement character U+FFFD.
    func QuoteRuneToASCII(r rune) string {
    	return quoteRuneWith(r, '\'', true, false)
    }
    
    // AppendQuoteRuneToASCII 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, r rune) []byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  4. src/strconv/example_test.go

    	// "\"Fran & Freddie's Diner\t☺\""
    }
    
    func ExampleQuoteRune() {
    	s := strconv.QuoteRune('☺')
    	fmt.Println(s)
    
    	// Output:
    	// '☺'
    }
    
    func ExampleQuoteRuneToASCII() {
    	s := strconv.QuoteRuneToASCII('☺')
    	fmt.Println(s)
    
    	// Output:
    	// '\u263a'
    }
    
    func ExampleQuoteRuneToGraphic() {
    	s := strconv.QuoteRuneToGraphic('☺')
    	fmt.Println(s)
    
    	s = strconv.QuoteRuneToGraphic('\u263a')
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 22:57:37 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"ParseBool", Func, 0},
    		{"ParseComplex", Func, 15},
    		{"ParseFloat", Func, 0},
    		{"ParseInt", Func, 0},
    		{"ParseUint", Func, 0},
    		{"Quote", Func, 0},
    		{"QuoteRune", Func, 0},
    		{"QuoteRuneToASCII", Func, 0},
    		{"QuoteRuneToGraphic", Func, 6},
    		{"QuoteToASCII", Func, 0},
    		{"QuoteToGraphic", Func, 6},
    		{"QuotedPrefix", Func, 17},
    		{"Unquote", Func, 0},
    		{"UnquoteChar", Func, 0},
    	},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  6. api/go1.txt

    pkg strconv, func ParseInt(string, int, int) (int64, error)
    pkg strconv, func ParseUint(string, int, int) (uint64, error)
    pkg strconv, func Quote(string) string
    pkg strconv, func QuoteRune(int32) string
    pkg strconv, func QuoteRuneToASCII(int32) string
    pkg strconv, func QuoteToASCII(string) string
    pkg strconv, func Unquote(string) (string, error)
    pkg strconv, func UnquoteChar(string, uint8) (int32, bool, string, error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top