gunsafe

package
v0.0.0-...-986f64f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

本包提供unsafe包的拓展功能

注意,本包因为绕开了go语言安全机制,导入不安全的软件包可能是不可移植的,并且不受Go 1兼容性指南的保护。

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Btos

func Btos(b []byte) string

将[]byte零拷贝转换为string

Example
b := []byte("hello")
s := Btos(b)
fmt.Println(s)
Output:

hello

func Stob

func Stob(s string) []byte

将string零拷贝转换为[]byte

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL