MCPcopy
hub / github.com/u-root/u-root / String

Function String

pkg/forth/forth.go:250–258  ·  view source on GitHub ↗

String returns the Top Of Stack if it is a string or panics.

(f Forth)

Source from the content-addressed store, hash-verified

248// String returns the Top Of Stack if it is a string
249// or panics.
250func String(f Forth) string {
251 c := f.Pop()
252 switch s := c.(type) {
253 case string:
254 return s
255 default:
256 panic(fmt.Sprintf("Can't convert %v to a string", c))
257 }
258}
259
260// toInt converts to int64.
261func toInt(f Forth) int64 {

Callers 5

newwordFunction · 0.85
strcatFunction · 0.85
hostbaseFunction · 0.85
text.jsFile · 0.85
escapeHtmlFunction · 0.85

Calls 1

PopMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…