Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for RawString (0.12 sec)

  1. src/runtime/string.go

    	var b []byte
    	if buf != nil {
    		b = buf[:]
    		s = slicebytetostringtmp(&b[0], len(b))
    	} else {
    		s, b = rawstring(4)
    	}
    	if int64(rune(v)) != v {
    		v = runeError
    	}
    	n := encoderune(b, rune(v))
    	return s[:n]
    }
    
    // rawstring allocates storage for a new string. The returned
    // string and byte slice both refer to the same storage.
    // The storage is not zeroed. Callers should use
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  2. src/text/scanner/scanner_test.go

    	{String, `"\ufA16"`},
    	{String, `"\U00000000"`},
    	{String, `"\U0000ffAB"`},
    	{String, `"` + f100 + `"`},
    
    	{Comment, "// raw strings"},
    	{RawString, "``"},
    	{RawString, "`\\`"},
    	{RawString, "`" + "\n\n/* foobar */\n\n" + "`"},
    	{RawString, "`" + f100 + "`"},
    
    	{Comment, "// individual characters"},
    	// NUL character is not allowed
    	{'\x01', "\x01"},
    	{' ' - 1, string(' ' - 1)},
    	{'+', "+"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 17 03:41:50 UTC 2022
    - 25.3K bytes
    - Viewed (0)
  3. src/text/scanner/scanner.go

    const (
    	EOF = -(iota + 1)
    	Ident
    	Int
    	Float
    	Char
    	String
    	RawString
    	Comment
    
    	// internal use only
    	skipComment
    )
    
    var tokenString = map[rune]string{
    	EOF:       "EOF",
    	Ident:     "Ident",
    	Int:       "Int",
    	Float:     "Float",
    	Char:      "Char",
    	String:    "String",
    	RawString: "RawString",
    	Comment:   "Comment",
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  4. src/go/internal/gccgoimporter/testdata/v1reflect.gox

     func (k <type 28>) String () <type -16>;
    >; Implements (u <type 26>) <type -15>; AssignableTo (u <type 26>) <type -15>; Bits () <type -11>; ChanDir () <type 29 "ChanDir" <type -11>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 30 21:33:51 UTC 2021
    - 10.3K bytes
    - Viewed (0)
  5. src/cmd/internal/goobj/objfile.go

    		return
    	}
    	w.stringMap[s] = w.off
    	w.RawString(s)
    }
    
    func (w *Writer) stringOff(s string) uint32 {
    	off, ok := w.stringMap[s]
    	if !ok {
    		panic(fmt.Sprintf("writeStringRef: string not added: %q", s))
    	}
    	return off
    }
    
    func (w *Writer) StringRef(s string) {
    	w.Uint32(uint32(len(s)))
    	w.Uint32(w.stringOff(s))
    }
    
    func (w *Writer) RawString(s string) {
    	w.wr.WriteString(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/scanner.go

    	case '\n':
    		s.nextch()
    		s.lit = "newline"
    		s.tok = _Semi
    
    	case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
    		s.number(false)
    
    	case '"':
    		s.stdString()
    
    	case '`':
    		s.rawString()
    
    	case '\'':
    		s.rune()
    
    	case '(':
    		s.nextch()
    		s.tok = _Lparen
    
    	case '[':
    		s.nextch()
    		s.tok = _Lbrack
    
    	case '{':
    		s.nextch()
    		s.tok = _Lbrace
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
  7. src/runtime/arena.go

    		// Not stored in a user arena chunk.
    		return s
    	}
    	// Heap-allocate storage for a copy.
    	var x any
    	switch t.Kind_ & abi.KindMask {
    	case abi.String:
    		s1 := s.(string)
    		s2, b := rawstring(len(s1))
    		copy(b, s1)
    		x = s2
    	case abi.Slice:
    		len := (*slice)(e.data).len
    		et := (*slicetype)(unsafe.Pointer(t)).Elem
    		sl := new(slice)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
Back to top