Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Parsenum (0.19 sec)

  1. src/fmt/export_test.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package fmt
    
    var IsSpace = isSpace
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 04 21:00:35 UTC 2016
    - 219 bytes
    - Viewed (0)
  2. src/fmt/print.go

    // too large to be used as a formatting width or precision.
    func tooLarge(x int) bool {
    	const max int = 1e6
    	return x > max || x < -max
    }
    
    // parsenum converts ASCII to integer.  num is 0 (and isnum is false) if no number present.
    func parsenum(s string, start, end int) (num int, isnum bool, newi int) {
    	if start >= end {
    		return 0, false, end
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

    	arg += s.firstArg - 1 // We want to zero-index the actual arguments.
    	s.argNum = arg
    	s.hasIndex = true
    	s.indexPending = true
    	return true
    }
    
    // parseNum scans a width or precision (or *). It returns false if there's a bad index expression.
    func (s *formatState) parseNum() bool {
    	if s.nbytes < len(s.format) && s.format[s.nbytes] == '*' {
    		if s.indexPending { // Absorb it.
    			s.indexPending = false
    		}
    		s.nbytes++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  4. src/fmt/fmt_test.go

    		{"12a3", 0, 4, 12, true, 2},
    		{"1234", 0, 4, 1234, true, 4},
    		{"1a234", 1, 3, 0, false, 1},
    	}
    	for _, tt := range testCases {
    		num, isnum, newi := Parsenum(tt.s, tt.start, tt.end)
    		if num != tt.num || isnum != tt.isnum || newi != tt.newi {
    			t.Errorf("parsenum(%q, %d, %d) = %d, %v, %d, want %d, %v, %d", tt.s, tt.start, tt.end, num, isnum, newi, tt.num, tt.isnum, tt.newi)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 58.6K bytes
    - Viewed (0)
  5. src/fmt/scan.go

    			}
    			// Otherwise at EOF; "too many operands" error handled below
    			break
    		}
    		i++ // % is one byte
    
    		// do we have 20 (width)?
    		var widPresent bool
    		s.maxWid, widPresent, i = parsenum(format, i, end)
    		if !widPresent {
    			s.maxWid = hugeWid
    		}
    
    		c, w := utf8.DecodeRuneInString(format[i:])
    		i += w
    
    		if c != 'c' {
    			s.SkipSpace()
    		}
    		if c == '%' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  6. cmd/sts-handlers_test.go

    						},
    					},
    				}
    
    				for caseNum, content := range iamTestContentCases {
    					suite.SetUpSuite(c)
    					suite.SetUpLDAP(c, ldapServer)
    					exportedContent := suite.TestIAMExport(c, caseNum, content)
    					suite.TearDownSuite(c)
    					suite.SetUpSuite(c)
    					suite.SetUpLDAP(c, ldapServer)
    					suite.TestIAMImport(c, exportedContent, caseNum, content)
    					suite.TearDownSuite(c)
    				}
    			},
    		)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 18:45:50 UTC 2024
    - 90K bytes
    - Viewed (0)
Back to top