Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 96 for isLetter (0.14 sec)

  1. src/unicode/letter_test.go

    func TestIsLetter(t *testing.T) {
    	for _, r := range upperTest {
    		if !IsLetter(r) {
    			t.Errorf("IsLetter(U+%04X) = false, want true", r)
    		}
    	}
    	for _, r := range letterTest {
    		if !IsLetter(r) {
    			t.Errorf("IsLetter(U+%04X) = false, want true", r)
    		}
    	}
    	for _, r := range notletterTest {
    		if IsLetter(r) {
    			t.Errorf("IsLetter(U+%04X) = true, want false", r)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 09 01:46:03 UTC 2023
    - 14.8K bytes
    - Viewed (0)
  2. src/strings/example_test.go

    		return !unicode.IsLetter(r) && !unicode.IsNumber(r)
    	}))
    	// Output: Hello, Gophers
    }
    
    func ExampleTrimLeft() {
    	fmt.Print(strings.TrimLeft("¡¡¡Hello, Gophers!!!", "!¡"))
    	// Output: Hello, Gophers!!!
    }
    
    func ExampleTrimLeftFunc() {
    	fmt.Print(strings.TrimLeftFunc("¡¡¡Hello, Gophers!!!", func(r rune) bool {
    		return !unicode.IsLetter(r) && !unicode.IsNumber(r)
    	}))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 22:05:38 UTC 2023
    - 10.7K bytes
    - Viewed (0)
  3. src/cmd/vendor/rsc.io/markdown/html.go

    	switch {
    	case strings.HasPrefix(t, "<!--"):
    		end = "-->"
    	case strings.HasPrefix(t, "<?"):
    		end = "?>"
    	case strings.HasPrefix(t, "<![CDATA["):
    		end = "]]>"
    	case strings.HasPrefix(t, "<!") && len(t) >= 3 && isLetter(t[2]):
    		if 'a' <= t[2] && t[2] <= 'z' {
    			// Goldmark and the Dingus only accept <!UPPER> not <!lower>.
    			p.corner = true
    		}
    		end = ">"
    	}
    	if end != "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/scanner.go

    	for s.ch == ' ' || s.ch == '\t' || s.ch == '\n' && !nlsemi || s.ch == '\r' {
    		s.nextch()
    	}
    
    	// token start
    	s.line, s.col = s.pos()
    	s.blank = s.line > startLine || startCol == colbase
    	s.start()
    	if isLetter(s.ch) || s.ch >= utf8.RuneSelf && s.atIdentChar(true) {
    		s.nextch()
    		s.ident()
    		return
    	}
    
    	switch s.ch {
    	case -1:
    		if nlsemi {
    			s.lit = "EOF"
    			s.tok = _Semi
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
  5. src/go/scanner/scanner.go

    		return 0, 0, false // no ":"
    	}
    	// i >= 0
    	n, err := strconv.ParseUint(string(text[i+1:]), 10, 0)
    	return i + 1, int(n), err == nil
    }
    
    func isLetter(ch rune) bool {
    	return 'a' <= lower(ch) && lower(ch) <= 'z' || ch == '_' || ch >= utf8.RuneSelf && unicode.IsLetter(ch)
    }
    
    func isDigit(ch rune) bool {
    	return isDecimal(ch) || ch >= utf8.RuneSelf && unicode.IsDigit(ch)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 24.3K bytes
    - Viewed (0)
  6. src/go/build/constraint/expr.go

    		}
    		p.pos = p.i
    		p.i += 2
    		p.tok = p.s[p.pos:p.i]
    		return
    	}
    
    	tag := p.s[p.i:]
    	for i, c := range tag {
    		if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
    			tag = tag[:i]
    			break
    		}
    	}
    	if tag == "" {
    		c, _ := utf8.DecodeRuneInString(p.s[p.i:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  7. src/go/doc/comment/parse.go

    	line = strings.TrimSpace(line)
    
    	// a heading must start with an uppercase letter
    	r, _ := utf8.DecodeRuneInString(line)
    	if !unicode.IsLetter(r) || !unicode.IsUpper(r) {
    		return false
    	}
    
    	// it must end in a letter or digit:
    	r, _ = utf8.DecodeLastRuneInString(line)
    	if !unicode.IsLetter(r) && !unicode.IsDigit(r) {
    		return false
    	}
    
    	// exclude lines with illegal characters. we allow "(),"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 33.5K bytes
    - Viewed (0)
  8. src/text/template/funcs.go

    func goodName(name string) bool {
    	if name == "" {
    		return false
    	}
    	for i, r := range name {
    		switch {
    		case r == '_':
    		case i == 0 && !unicode.IsLetter(r):
    			return false
    		case !unicode.IsLetter(r) && !unicode.IsDigit(r):
    			return false
    		}
    	}
    	return true
    }
    
    // findFunction looks for a function in the template, and global map.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  9. src/cmd/vendor/rsc.io/markdown/link.go

    	//	characters, space, <, and >. If the URI includes these characters,
    	//	they must be percent-encoded (e.g. %20 for a space).
    
    	j := i
    	if j+1 >= len(s) || s[j] != '<' || !isLetter(s[j+1]) {
    		return nil, 0, false
    	}
    	j++
    	for j < len(s) && isScheme(s[j]) && j-(i+1) <= 32 {
    		j++
    	}
    	if j-(i+1) < 2 || j-(i+1) > 32 || j >= len(s) || s[j] != ':' {
    		return nil, 0, false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  10. src/cmd/go/internal/imports/build.go

    func matchTag(name string, tags map[string]bool, prefer bool) bool {
    	// Tags must be letters, digits, underscores or dots.
    	// Unlike in Go identifiers, all digits are fine (e.g., "386").
    	for _, c := range name {
    		if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
    			return false
    		}
    	}
    
    	if tags["*"] && name != "" && name != "ignore" {
    		// Special case for gathering all possible imports:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 30 18:50:57 UTC 2023
    - 10.4K bytes
    - Viewed (0)
Back to top