Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for AppendQuoteRuneToASCII (0.17 sec)

  1. src/strconv/quote_test.go

    		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 {
    			t.Errorf("AppendQuoteRuneToASCII(%q, %U) = %s, want %s", "abc", tt.in, out, "abc"+tt.ascii)
    		}
    	}
    }
    
    func TestQuoteRuneToGraphic(t *testing.T) {
    	for _, tt := range quoterunetests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  2. src/strconv/example_test.go

    	b := []byte("rune:")
    	b = strconv.AppendQuoteRune(b, '☺')
    	fmt.Println(string(b))
    
    	// Output:
    	// rune:'☺'
    }
    
    func ExampleAppendQuoteRuneToASCII() {
    	b := []byte("rune (ascii):")
    	b = strconv.AppendQuoteRuneToASCII(b, '☺')
    	fmt.Println(string(b))
    
    	// Output:
    	// rune (ascii):'\u263a'
    }
    
    func ExampleAppendQuoteToASCII() {
    	b := []byte("quote (ascii):")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 22:57:37 UTC 2023
    - 8.9K bytes
    - Viewed (0)
Back to top