MCPcopy Create free account
hub / github.com/dispatchrun/wazergo / WriteString

Method WriteString

wasm/memory.go:151–157  ·  view source on GitHub ↗
(offset uint32, value string)

Source from the content-addressed store, hash-verified

149}
150
151func (mem *Memory) WriteString(offset uint32, value string) bool {
152 if mem.isOutOfRange(offset, uint32(len(value))) {
153 return false
154 }
155 copy(mem.memory[offset:], value)
156 return true
157}
158
159func (mem *Memory) isOutOfRange(offset, length uint32) bool {
160 size := mem.Size()

Callers 6

formatNoneFunction · 0.80
FormatValueMethod · 0.80
formatFunction · 0.80
formatArrayFunction · 0.80
formatStructFunction · 0.80
formatPointerFunction · 0.80

Calls 1

isOutOfRangeMethod · 0.95

Tested by

no test coverage detected