Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,056 for gostringw (0.13 sec)

  1. src/runtime/string_test.go

    		var b []uint16
    		for _, c := range s {
    			b = append(b, uint16(c))
    			if c != rune(uint16(c)) {
    				t.Errorf("bad test: stringW can't handle >16 bit runes")
    			}
    		}
    		b = append(b, 0)
    		r := runtime.GostringW(b)
    		if r != s {
    			t.Errorf("gostringW(%v) = %s, want %s", b, r, s)
    		}
    	}
    }
    
    func TestLargeStringConcat(t *testing.T) {
    	output := runTestProg(t, "testprog", "stringconcat")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 13 14:05:23 UTC 2022
    - 13.3K bytes
    - Viewed (0)
  2. src/runtime/string.go

    // This is exported via linkname to assembly in syscall (for Plan9) and cgo.
    //
    //go:linkname gostring
    func gostring(p *byte) string {
    	l := findnull(p)
    	if l == 0 {
    		return ""
    	}
    	s, b := rawstring(l)
    	memmove(unsafe.Pointer(&b[0]), unsafe.Pointer(p), uintptr(l))
    	return s
    }
    
    // internal_syscall_gostring is a version of gostring for internal/syscall/unix.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. src/runtime/export_test.go

    func MemclrBytes(b []byte) {
    	s := (*slice)(unsafe.Pointer(&b))
    	memclrNoHeapPointers(s.array, uintptr(s.len))
    }
    
    const HashLoad = hashLoad
    
    // entry point for testing
    func GostringW(w []uint16) (s string) {
    	systemstack(func() {
    		s = gostringw(&w[0])
    	})
    	return
    }
    
    var Open = open
    var Close = closefd
    var Read = read
    var Write = write
    
    func Envs() []string     { return envs }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
  4. src/runtime/os_windows.go

    		if p[i] == 0 {
    			// empty string marks the end
    			if i == from {
    				break
    			}
    			from = i + 1
    			n++
    		}
    	}
    	envs = make([]string, n)
    
    	for i := range envs {
    		envs[i] = gostringw(&p[0])
    		for p[0] != 0 {
    			p = p[1:]
    		}
    		p = p[1:] // skip nil byte
    	}
    
    	stdcall1(_FreeEnvironmentStringsW, uintptr(strings))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  5. src/cmd/cgo/doc.go

    C.sizeof_struct_stat.
    
    A C function may be declared in the Go file with a parameter type of
    the special name _GoString_. This function may be called with an
    ordinary Go string value. The string length, and a pointer to the
    string contents, may be accessed by calling the C functions
    
    	size_t _GoStringLen(_GoString_ s);
    	const char *_GoStringPtr(_GoString_ s);
    
    These functions are only available in the preamble, not in other C
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 17:12:16 UTC 2024
    - 42.2K bytes
    - Viewed (0)
  6. api/go1.10.txt

    pkg debug/macho, method (RelocTypeARM) GoString() string
    pkg debug/macho, method (RelocTypeARM) String() string
    pkg debug/macho, method (RelocTypeARM64) GoString() string
    pkg debug/macho, method (RelocTypeARM64) String() string
    pkg debug/macho, method (RelocTypeGeneric) GoString() string
    pkg debug/macho, method (RelocTypeGeneric) String() string
    pkg debug/macho, method (RelocTypeX86_64) GoString() string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 06 05:00:01 UTC 2018
    - 30.1K bytes
    - Viewed (0)
  7. api/go1.6.txt

    pkg debug/elf, const SHF_COMPRESSED = 2048
    pkg debug/elf, const SHF_COMPRESSED SectionFlag
    pkg debug/elf, method (CompressionType) GoString() string
    pkg debug/elf, method (CompressionType) String() string
    pkg debug/elf, method (R_MIPS) GoString() string
    pkg debug/elf, method (R_MIPS) String() string
    pkg debug/elf, type Chdr32 struct
    pkg debug/elf, type Chdr32 struct, Addralign uint32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 13 23:40:13 UTC 2016
    - 12.9K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/test.go

    	}
    }
    
    // api
    
    const greeting = "hello, world"
    
    type testPair struct {
    	Name      string
    	Got, Want interface{}
    }
    
    var testPairs = []testPair{
    	{"GoString", C.GoString(C.greeting), greeting},
    	{"GoStringN", C.GoStringN(C.greeting, 5), greeting[:5]},
    	{"GoBytes", C.GoBytes(unsafe.Pointer(C.greeting), 5), []byte(greeting[:5])},
    }
    
    func testHelpers(t *testing.T) {
    	for _, pair := range testPairs {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  9. src/fmt/print.go

    // such as [Print].
    type Stringer interface {
    	String() string
    }
    
    // GoStringer is implemented by any value that has a GoString method,
    // which defines the Go syntax for that value.
    // The GoString method is used to print values passed as an operand
    // to a %#v format.
    type GoStringer interface {
    	GoString() string
    }
    
    // FormatString returns a string representing the fully qualified formatting
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  10. maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java

            assertTrue(restriction.isLowerBoundInclusive(), CHECK_LOWER_BOUND_INCLUSIVE);
            assertEquals("1.4", restriction.getUpperBound().toString(), CHECK_UPPER_BOUND);
            assertTrue(restriction.isUpperBoundInclusive(), CHECK_UPPER_BOUND_INCLUSIVE);
            restriction = restrictions.get(2);
            assertEquals("1.5", restriction.getLowerBound().toString(), CHECK_LOWER_BOUND);
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Wed Sep 06 08:39:32 UTC 2023
    - 44.3K bytes
    - Viewed (0)
Back to top