PSTR extension type

A strongly-typed wrapper around a Win32 PSTR.

PSTR is commonly used by legacy Win32 APIs to represent mutable, null-terminated string of 8-bit Windows (ANSI) characters.

on
Implemented types

Constructors

PSTR(Pointer<Utf8> _)
const

Properties

address → int
Access to the raw pointer value. On 32-bit systems, the upper 32-bits of the result are 0.
no setterinherited
byteLength → int
The length of this string in bytes, not including the terminating NUL character.
no setter
hashCode → int
The hash code for a Pointer only depends on its address.
no setterinherited
isEmpty → bool
Whether this string is empty.
no setter
length → int
The number of bytes in this string, excluding the terminating NUL character.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cast<U extends NativeType>() → Pointer<U>
Reinterprets the address of this pointer as the address of a U.
inherited
copy({Allocator allocator = adaptiveCalloc}) → PSTR
Creates a deep copy of this string into newly allocated native memory.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setString(String string) → int
Writes string into this buffer as ANSI-encoded bytes.
toDartString({int? length}) → String
Converts this PSTR to a Dart String.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
Equality for Pointers only depends on their address.
inherited