MCPcopy
hub / github.com/tinygo-org/tinygo / WriteString

Method WriteString

src/os/file.go:172–174  ·  view source on GitHub ↗

WriteString is like Write, but writes the contents of string s rather than a slice of bytes.

(s string)

Source from the content-addressed store, hash-verified

170// WriteString is like Write, but writes the contents of string s rather than a
171// slice of bytes.
172func (f *File) WriteString(s string) (n int, err error) {
173 return f.Write([]byte(s))
174}
175
176var errWriteAtInAppendMode = errors.New("os: invalid use of WriteAt on file opened with O_APPEND")
177

Callers 15

DiffFunction · 0.80
writeGoFunction · 0.80
writeGoRegisterConstantsFunction · 0.80
writeAsmFunction · 0.80
TestCGoFunction · 0.80
getMacroMethod · 0.80
TestFdFunction · 0.80
file_anyos_test.goFile · 0.80
writeFileFunction · 0.80
TestRead0Function · 0.80
TestReadAt0Function · 0.80

Calls 1

WriteMethod · 0.95

Tested by 11

TestCGoFunction · 0.64
TestFdFunction · 0.64
writeFileFunction · 0.64
TestRead0Function · 0.64
TestReadAt0Function · 0.64
TestSeekFunction · 0.64
TestReadAtFunction · 0.64
TestReadAtOffsetFunction · 0.64
TestReadAtNegativeOffsetFunction · 0.64
TestWriteAtFunction · 0.64
initFunction · 0.64