- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for Sscanln (0.09 sec)
-
src/fmt/scan_test.go
t.Errorf("Sscanf: expected %q; got %q", input, tscanf) } // Sscanln should not work var tscanln TwoLines n, err = Sscanln(input, &tscanln) if n != 0 { t.Errorf("Sscanln: expected 0 items; got %d: %q", n, tscanln) } if err == nil { t.Error("Sscanln: expected error; got none") } else if err != io.ErrUnexpectedEOF { t.Errorf("Sscanln: expected io.ErrUnexpectedEOF (ha!); got %s", err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 20:25:13 UTC 2023 - 39.3K bytes - Viewed (0) -
src/fmt/doc.go
An analogous set of functions scans formatted text to yield values. [Scan], [Scanf] and [Scanln] read from [os.Stdin]; [Fscan], [Fscanf] and [Fscanln] read from a specified [io.Reader]; [Sscan], [Sscanf] and [Sscanln] read from an argument string. [Scan], [Fscan], [Sscan] treat newlines in the input as spaces. [Scanln], [Fscanln] and [Sscanln] stop scanning at a newline and require that the items be followed by a newline or EOF.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:56:20 UTC 2024 - 14.6K bytes - Viewed (0) -
src/fmt/scan.go
func Sscan(str string, a ...any) (n int, err error) { return Fscan((*stringReader)(&str), a...) } // Sscanln is similar to [Sscan], but stops scanning at a newline and // after the final item there must be a newline or EOF. func Sscanln(str string, a ...any) (n int, err error) { return Fscanln((*stringReader)(&str), a...) } // Sscanf scans the argument string, storing successive space-separated
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:56:20 UTC 2024 - 31.9K bytes - Viewed (0) -
src/fmt/example_test.go
// 5 true gophers // 3 } func ExampleFscanln() { s := `dmr 1771 1.61803398875 ken 271828 3.14159` r := strings.NewReader(s) var a string var b int var c float64 for { n, err := fmt.Fscanln(r, &a, &b, &c) if err == io.EOF { break } if err != nil { panic(err) } fmt.Printf("%d: %s, %d, %f\n", n, a, b, c) } // Output: // 3: dmr, 1771, 1.618034 // 3: ken, 271828, 3.141590
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 21:03:10 UTC 2019 - 11.8K bytes - Viewed (0) -
cmd/common-main.go
fmt.Println("Refer to the docs here on how to run it as a Windows Service https://github.com/minio/minio-service/tree/master/windows") fmt.Println("Press the Enter Key to Exit") fmt.Scanln() os.Exit(1) } } logger.Init(GOPATH, GOROOT) logger.RegisterError(config.FmtError) globalBatchJobsMetrics = batchJobMetrics{metrics: make(map[string]*batchJobInfo)}
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu May 30 11:58:12 UTC 2024 - 31.5K bytes - Viewed (0)