使用fmt.Sscanf报unexpected EOF?

yecz · 2022-09-21 17:23:51 · 1778 次点击
更多评论

// Sscanf scans the argument string, storing successive space-separated // values into successive arguments as determined by the format. It // returns the number of items successfully parsed. // Newlines in the input must match newlines in the format.

#1

// Sscanf scans the argument string, storing successive space-separated

// values into successive arguments as determined by the format. It

// returns the number of items successfully parsed.

// Newlines in the input must match newlines in the format.

func Sscanf(str string, format string, a ...any) (n int, err error) {

return Fscanf((*stringReader)(&str), format, a...)

}

#2