MCPcopy Create free account
hub / github.com/decomp/decomp / joinFunc

Function joinFunc

cmd/go-post/typecheck.go:619–627  ·  view source on GitHub ↗

joinFunc is the inverse of splitFunc.

(in, out []string)

Source from the content-addressed store, hash-verified

617
618// joinFunc is the inverse of splitFunc.
619func joinFunc(in, out []string) string {
620 outs := ""
621 if len(out) == 1 {
622 outs = " " + out[0]
623 } else if len(out) > 1 {
624 outs = " (" + join(out) + ")"
625 }
626 return "func(" + join(in) + ")" + outs
627}
628
629// split splits "int, float" into ["int", "float"] and splits "" into [].
630func split(s string) []string {

Callers 1

typecheck1Function · 0.85

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected