common

package
v1.3.393 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 3 Imported by: 9

Documentation

Overview

Package common 公共函数.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) uintptr

BoolPtr 将bool转换到uintptr.

b: bool.

func ByteSliceDataPtr

func ByteSliceDataPtr(b *[]byte) uintptr

ByteSliceDataPtr 将byte[0]的指针转换到uintptr.

b: byte[0]的指针.

func Bytes2String added in v1.3.381

func Bytes2String(b []byte) string

Bytes2String 转换[]byte到string.

b: []byte.

func Float32Ptr

func Float32Ptr(f float32) uintptr

Float32Ptr 将float32转换到uintptr.

f: float32.

func StrPtr

func StrPtr(s string) uintptr

StrPtr 将string转换到uintptr.

s: 文本.

func String2Bytes added in v1.3.381

func String2Bytes(s string) []byte

String2Bytes 转换string到[]byte.

s: 文本.

func StringToUint16Ptr

func StringToUint16Ptr(s string) *uint16

StringToUint16Ptr 返回指向 UTF-8 字符串 s 的 UTF-16 编码的指针,与 syscall.UTF16PtrFromString 不同的是末尾没有添加终止 NUL.

s: 文本.

func Uint16SliceDataPtr

func Uint16SliceDataPtr(p *[]uint16) uintptr

Uint16SliceDataPtr 将uint16[0]指针转换到uintptr.

p: uint16[0]的指针.

func Uint16SliceToStringSlice

func Uint16SliceToStringSlice(s []uint16) []string

Uint16SliceToStringSlice 按null字符分割, 把 []uint16 转换到 []string.

s: []uint16.

func UintPtrToFloat32

func UintPtrToFloat32(ptr uintptr) float32

UintPtrToFloat32 将uintptr转换到float32.

ptr: uintptr.

func UintPtrToString

func UintPtrToString(ptr uintptr) string

UintPtrToString 将uintptr转换到string.

ptr: uintptr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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