Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for abc (0.12 sec)

  1. src/bytes/example_test.go

    }
    
    func ExampleToValidUTF8() {
    	fmt.Printf("%s\n", bytes.ToValidUTF8([]byte("abc"), []byte("\uFFFD")))
    	fmt.Printf("%s\n", bytes.ToValidUTF8([]byte("a\xffb\xC0\xAFc\xff"), []byte("")))
    	fmt.Printf("%s\n", bytes.ToValidUTF8([]byte("\xed\xa0\x80"), []byte("abc")))
    	// Output:
    	// abc
    	// abc
    	// abc
    }
    
    func ExampleTrim() {
    	fmt.Printf("[%q]", bytes.Trim([]byte(" !!! Achtung! Achtung! !!! "), "! "))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  2. src/archive/zip/zip_test.go

    	const keep = 10
    	ss := &suffixSaver{keep: keep}
    	ss.Write([]byte("abc"))
    	if got := string(ss.Suffix()); got != "abc" {
    		t.Errorf("got = %q; want abc", got)
    	}
    	ss.Write([]byte("defghijklmno"))
    	if got := string(ss.Suffix()); got != "fghijklmno" {
    		t.Errorf("got = %q; want fghijklmno", got)
    	}
    	if got, want := ss.Size(), int64(len("abc")+len("defghijklmno")); got != want {
    		t.Errorf("Size = %d; want %d", got, want)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
Back to top