Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WcharPtrToGoRune ¶
convenient wrapper for WcharPtrToWcharString(first).GoString()
func WcharStringPtrNToGoString ¶
convert a *C.wchar_t and length int to a Go string convenient wrapper for WcharPtrIntToWcharString(first, length).GoString()
Types ¶
type Wchar ¶
type Wchar int32
go representation of a wchar
func FromGoRune ¶
func FromWcharPtr ¶
FromWcharPtr converts a *C.wchar_t to a Go Wchar
type WcharString ¶
type WcharString []Wchar
go representation of a wchar string (array)
func FromGoString ¶
func FromGoString(s string) (WcharString, error)
FromGoString creates a WcharString from a Go string
func FromWcharStringPtr ¶
func FromWcharStringPtr(first unsafe.Pointer) WcharString
FromWcharStringPtr creates a WcharString from a *C.wchar_t. It finds the end of the *C.wchar_t string by finding the null terminator.
func FromWcharStringPtrN ¶
func FromWcharStringPtrN(first unsafe.Pointer, length int) WcharString
convert a *C.wchar_t and length int to a WcharString
func NewWcharString ¶
func NewWcharString(length int) WcharString
NewWcharString creates a new WcharString with given length. This is required when the WcharString is being used as write buffer for a call to a C function.
func (WcharString) GoString ¶
func (ws WcharString) GoString() (string, error)
convert WcharString to Go string will return an error when conversion failed.