std/jule/integrated
Index
fn Malloc(size: uint): *unsafe
fn Calloc(size: uint, n: uint): *unsafe
unsafe fn Realloc(mut ptr: *unsafe, size: uint): *unsafe
unsafe fn Free(mut ptr: *unsafe)
fn New[T](): *T
fn NewArray[T](size: int): *T
unsafe fn Delete[T](heap: *T)
unsafe fn DeleteArray[T](heap: *T)
fn UTF16FromStr(s: str): []u16
fn UTF16ToStr(s: []u16): str
unsafe fn U16PtrToStr(s: *u16): str
unsafe fn BytePtrToStr(s: *byte): str
fn StrToBytes(s: str): []byte
type Char
type Wchar
type SignedChar
type UnsignedChar
type Short
type ShortInt
type SignedShort
type SignedShortInt
type UnsignedShort
type UnsignedShortInt
type Int
type Signed
type SignedInt
type Unsigned
type UnsignedInt
type Long
type LongInt
type SignedLong
type SignedLongInt
type UnsignedLong
type UnsignedLongInt
type LongLong
type LongLongInt
type SignedLongLong
type SignedLongLongInt
type UnsignedLongLong
type UnsignedLongLongInt
type Float
type Double
type LongDouble
type Bool
Malloc
fn Malloc(size: uint): *unsafe
Allocates size bytes of memory. Memory does not initialize. Returns pointer to allocation if success, nil if not.
This function is part of the C-style memory management. It can be very dangerous.
Calloc
fn Calloc(size: uint, n: uint): *unsafe
Allocates n elements of size bytes each, all initialized to zero. Returns pointer to allocation if success, nil if not.
This function is part of the C-style memory management. It can be very dangerous.
Realloc
unsafe fn Realloc(mut ptr: *unsafe, size: uint): *unsafe
Re-allocates the previously allocated block in ptr, making the new block size bytes long. Returns pointer to allocation if success, nil if not.
This function is part of the C-style memory management. It can be very dangerous.
Free
unsafe fn Free(mut ptr: *unsafe)
Free a block allocated by malloc, realloc or calloc. ptr is not set as nil by function, therefore ptr is dangling after free. Set ptr as nil after free for more safety.
This function is part of the C-style memory management. It can be very dangerous.
New
fn New[T](): *T
Allocates new memory. Equivalent to: new T in C++
NewArray
fn NewArray[T](size: int): *T
Allocates new array memory. Equivalent to: new T[size] in C++
Delete
unsafe fn Delete[T](heap: *T)
Deallocates memory allocation. Equivalent to: delete heap in C++
DeleteArray
unsafe fn DeleteArray[T](heap: *T)
Deallocates array memory allocation. Equivalent to: delete[] heap in C++
UTF16FromStr
fn UTF16FromStr(s: str): []u16
Returns the UTF-16 encoding of the UTF-8 string s, with a terminating NULL added. If s includes NULL character at any location, ignores followed characters.
UTF16ToStr
fn UTF16ToStr(s: []u16): str
Returns the UTF-8 encoding of the UTF-16 sequence s, with a terminating NULL removed. Returns empty string if s is nil.
U16PtrToStr
unsafe fn U16PtrToStr(s: *u16): str
Returns the UTF-8 encoding of the UTF-16 sequence s in *u16 form, with a terminating NULL removed. Returns empty string if s is nil.
BytePtrToStr
unsafe fn BytePtrToStr(s: *byte): str
Returns the string of s, with a terminating NULL removed. Returns empty string if pointer is nil.
StrToBytes
fn StrToBytes(s: str): []byte
Returns s as NULL terminated byte slice which is able to be used safely as NULL terminated string pointer. If s contatins NULL termination at any location, accepts NULL termination is the end of s and skips following bytes.
Char
type Char: cpp.char
Type alias for char type.
Supports casting for:
- byte / u8
- i8
Wchar
type Wchar: cpp.wchar_t
Type alias for wchar_t type.
Supports casting for:
- u16
SignedChar
type SignedChar: cpp.__jule_signed_char
Type alias for signed char type.
UnsignedChar
type UnsignedChar: cpp.__jule_unsigned_char
Type alias for signed char type.
Short
type Short: cpp.short
Type alias for short type.
ShortInt
type ShortInt: Short
Type alias for short int type.
SignedShort
type SignedShort: Short
Type alias for signed short type.
SignedShortInt
type SignedShortInt: Short
Type alias for signed short int type.
UnsignedShort
type UnsignedShort: cpp.__jule_unsigned_short
Type alias for unsigned short type.
UnsignedShortInt
type UnsignedShortInt: UnsignedShort
Type alias for unsigned short int type.
Int
type Int: cpp.signed
Type alias for int type.
Signed
type Signed: Int
Type alias for signed type.
SignedInt
type SignedInt: Int
Type alias for signed int type.
Unsigned
type Unsigned: cpp.unsigned
Type alias for unsigned type.
UnsignedInt
type UnsignedInt: Unsigned
Type alias for unsigned int type.
Long
type Long: cpp.long
Type alias for long type.
LongInt
type LongInt: Long
Type alias for long int type.
SignedLong
type SignedLong: Long
Type alias for signed long type.
SignedLongInt
type SignedLongInt: Long
Type alias for signed long int type.
UnsignedLong
type UnsignedLong: cpp.__jule_unsigned_long
Type alias for unsigned long type.
UnsignedLongInt
type UnsignedLongInt: UnsignedLong
Type alias for unsigned long int type.
LongLong
type LongLong: cpp.__jule_unsigned_long
Type alias for long long type.
LongLongInt
type LongLongInt: LongLong
Type alias for long long int type.
SignedLongLong
type SignedLongLong: LongLong
Type alias for signed long long type.
SignedLongLongInt
type SignedLongLongInt: LongLong
Type alias for signed long long int type.
UnsignedLongLong
type UnsignedLongLong: cpp.__jule_unsigned_long_long
Type alias for unsigned long long type.
UnsignedLongLongInt
type UnsignedLongLongInt: UnsignedLongLong
Type alias for unsigned long long int type.
Float
type Float: cpp.float
Type alias for float type.
Double
type Double: cpp.double
Type alias for double type.
LongDouble
type LongDouble: cpp.__jule_long_double
Type alias for long double type.
Bool
type Bool: cpp.__jule_bool
Type alias for bool type.