Help us shape the future of Go! Take the 2026 Go Developer Survey

std

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LLGoFiles = "_wrap/string.cpp"
)
View Source
const LLGoPackage = "link: c++"

Variables

This section is empty.

Functions

func GoString

func GoString(v *String) string

GoString converts a C++ std::string object to a Go string.

Types

type String

type String struct {
	Unused [3 * unsafe.Sizeof(0)]byte
}

String represents a libc++ std::string object.

func NewString

func NewString(v string) *String

NewString creates a C++ std::string object.

func NewStringEmpty

func NewStringEmpty() *String

NewStringEmpty creates an empty std::string object.

func NewStringFrom

func NewStringFrom(v *String) *String

NewStringFrom creates a copy of a C++ std::string object.

func NewStringFromCStr

func NewStringFromCStr(cstr *c.Char) *String

NewStringFromCStr creates a C++ std::string object.

func NewStringFromCStrLen

func NewStringFromCStrLen(cstr *c.Char, n uintptr) *String

NewStringFromCStrLen creates a C++ std::string object.

func Str

func Str(v string) *String

Str creates a constant C++ std::string object.

func (*String) CStr

func (s *String) CStr() *c.Char

llgo:link (*String).CStr C.stdStringCStr

func (*String) Data

func (s *String) Data() *c.Char

llgo:link (*String).Data C.stdStringData

func (*String) Dispose

func (s *String) Dispose()

llgo:link (*String).Dispose C.stdStringDispose

func (*String) InitEmpty

func (s *String) InitEmpty()

llgo:link (*String).InitEmpty C.stdStringInitEmpty

func (*String) InitFrom

func (s *String) InitFrom(v *String)

llgo:link (*String).InitFrom C.stdStringInitFrom

func (*String) InitFromCStr

func (s *String) InitFromCStr(cstr *c.Char)

llgo:link (*String).InitFromCStr C.stdStringInitFromCStr

func (*String) InitFromCStrLen

func (s *String) InitFromCStrLen(cstr *c.Char, n uintptr)

llgo:link (*String).InitFromCStrLen C.stdStringInitFromCStrLen

func (*String) Size

func (s *String) Size() uintptr

llgo:link (*String).Size C.stdStringSize

func (*String) Str

func (s *String) Str() string

Str returns a Go string (it doesn't clone data of the C++ std::string object).

type StringView

type StringView = string

StringView represents a C++ std::string_view object.

Directories

Path Synopsis
_demo
cpphello command

Jump to

Keyboard shortcuts

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