namespace sys.core.lang
class Intrinsic
A collection of miscellaneous intrinsic operations and helper functions.
static def MemCopy(destination: Ptr, source: Ptr, bytes: PtrSize);
Does a C standard library `memcpy` operation, copying a number of bytes from a source to a destination.
destination | the destination pointer |
---|---|
source | the source pointer |
bytes | the number of bytes to copy |
static def CStrLen(source: Ptr): PtrSize;
Does a C standard library `strlen` operation, retuning the length of a null terminated C string.
Should not be used on `sys.core.lang.String` since it can contain valid null characters.
source | the C string |
---|
the length
static def CpuID(ref cpu: CArray, val level: Int);
Executes a CPU identifying set of instructions.
cpu | the output table |
---|---|
level | the level of the requested information |
Min(a: T, b: T): T;
Returns the minimum between two values.
Max(a: T, b: T): T;
Returns the maximum between two values.
Clamped(a: T, min: T, max: T): T;
Returns the `a` parameter clamped between two values.
Clamp(ref a: T, min: T, max: T);
Clamps the `a` parameter between two values.