MCPcopy Create free account
hub / github.com/goplus/py / NewString

Function NewString

string.go:20–25  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

18}
19
20func NewString(s string) *String {
21 cs := C.CString(s)
22 defer C.free(unsafe.Pointer(cs))
23 ret := C.PyString_FromString(cs)
24 return newString(ret)
25}
26
27func AsString(o *Base) (v *String, ok bool) {
28 if ok = C.stringCheck(o.c()) != 0; ok {

Callers 5

NewFloatFromStringFunction · 0.85
NewErrorFunction · 0.85
RaiseFunction · 0.85
TestModuleFunction · 0.85
TestBaseFunction · 0.85

Calls 1

newStringFunction · 0.85

Tested by 2

TestModuleFunction · 0.68
TestBaseFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…