Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ExampleEncoding_EncodeToString (0.25 sec)

  1. src/encoding/base32/example_test.go

    // license that can be found in the LICENSE file.
    
    // Keep in sync with ../base64/example_test.go.
    
    package base32_test
    
    import (
    	"encoding/base32"
    	"fmt"
    	"os"
    )
    
    func ExampleEncoding_EncodeToString() {
    	data := []byte("any + old & data")
    	str := base32.StdEncoding.EncodeToString(data)
    	fmt.Println(str)
    	// Output:
    	// MFXHSIBLEBXWYZBAEYQGIYLUME======
    }
    
    func ExampleEncoding_Encode() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 27 16:54:36 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  2. src/encoding/base64/example_test.go

    	if err != nil {
    		fmt.Println("decode error:", err)
    		return
    	}
    	fmt.Println(string(decoded))
    	// Output:
    	// SGVsbG8sIOS4lueVjA==
    	// Hello, 世界
    }
    
    func ExampleEncoding_EncodeToString() {
    	data := []byte("any + old & data")
    	str := base64.StdEncoding.EncodeToString(data)
    	fmt.Println(str)
    	// Output:
    	// YW55ICsgb2xkICYgZGF0YQ==
    }
    
    func ExampleEncoding_Encode() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 19 08:44:22 UTC 2021
    - 1.9K bytes
    - Viewed (0)
Back to top