<builtin>


_make(len, cap, elm_size int) array


Tags:

Applies to: None


add(a ustring) ustring


Tags:

Applies to: ustring


after(dot string) string


Tags:

Applies to: string


all_after(dot string) string


Tags:

Applies to: string


all_before_last(dot string) string


Tags:

Applies to: string


all_before(dot string) string

all_before('23:34:45.234', '.') == '23:34:45'

Tags:

Applies to: string


at(idx int) string


Tags:

Applies to: ustring


bool() bool


Tags:

Applies to: string


bytes() []byte


Tags:

Applies to: string


capitalize() string


Tags:

Applies to: string


clear()

clears the array without deallocating the allocated data

Tags: array

Applies to: array


clone() []byte


Tags:

Applies to: []byte


clone() array

returns an independent copy of a given array

Tags: array

Applies to: &array,array


clone() string


Tags:

Applies to: string


compare_f32(a, b &f32) int

compare_f32 for []f32 sort_with_compare()
See compare_i64 for usage

Tags: array

Applies to: None


compare_f64(a, b &f64) int

compare_f64 for []f64 sort_with_compare()
See compare_i64 for usage

Tags: array

Applies to: None


compare_i64(a, b &i64) int

compare_i64 for []f64 sort_with_compare()
sort []i64 with quicksort
usage :
mut x := [i64(100),10,70,28,92]
x.sort_with_compare(compare_i64)
println(x)       // Sorted i64 Array
output:
[10, 28, 70, 92, 100] 

Tags: array

Applies to: None


contains(p string) bool


Tags:

Applies to: string


contains(val byte) bool


Tags:

Applies to: []byte


contains(val int) bool


Tags:

Applies to: []int


contains(val string) bool


Tags:

Applies to: []string


copy(dst, src []byte) int

copy copies the `src` byte array elements to the `dst` byte array.
The number of the elements copied is the minimum of the length of both arrays.
Returns the number of elements copied

Tags: array

Applies to: None


count(substr string) int

counts occurrences of substr in s

Tags:

Applies to: string


count(substr ustring) int

counts occurrences of substr in s

Tags:

Applies to: ustring


cstr() byteptr


Tags:

Applies to: string


cstring_to_vstring(cstr byteptr) string

creates a copy of cstr and turns it into a v string

Tags:

Applies to: None


delete_elm(idx int)


Tags: array

Applies to: array


delete(i int)

deletes array element at the given index

Tags: array

Applies to: array


delete(key string)


Tags: map

Applies to: SortedMap,map


ends_with(p string) bool


Tags:

Applies to: string


eprint_ln(s string)


Tags:

Applies to: None


eprint(s string)


Tags:

Applies to: None


eprintln(s string)


Tags:

Applies to: None


eq(a2 []byte) bool

return array_eq(a, a2)

Tags: array

Applies to: []byte


eq(a2 []f32) bool

return array_eq(a, a2)

Tags: array

Applies to: []f32


eq(a2 []i64) bool

return array_eq(a, a2)

Tags: array

Applies to: []i64


eq(a2 []int) bool

return array_eq(a, a2)

Tags: array

Applies to: []int


eq(a2 []string) bool

return array_eq(a1, a2)

Tags: array

Applies to: []string


eq(b f32) bool


Tags:

Applies to: f32


eq(b f64) bool

compare floats using C epsilon

Tags:

Applies to: f64


eqbit(b f32) bool


Tags:

Applies to: f32


eqbit(b f64) bool


Tags:

Applies to: f64


error_with_code(s string, code int) Option


Tags:

Applies to: None


error(s string) Option


Tags:

Applies to: None


exit(code int)


Tags:

Applies to: None


f32() f32


Tags:

Applies to: string


f64() f64


Tags:

Applies to: string


find_between(start, end string) string

'hey [man] how you doin'
find_between('[', ']') == 'man'

Tags:

Applies to: string


first() voidptr

returns the first element of the array

Tags: array

Applies to: array


free()


Tags: array

Applies to: SortedMap,[]int,array,map,string


free(ptr voidptr)


Tags:

Applies to: None


free(voidptr)


Tags: array

Applies to: None


hash() int


Tags:

Applies to: string


hex() string

returns a string with the hexadecimal representation of the byte elements of the array

Tags: array

Applies to: []byte,byte,i16,i64,i8,int,u16,u32,u64


hex1() string


Tags:

Applies to: int


i16() i16


Tags:

Applies to: string


i64_str(n0 i64, base int) string


Tags:

Applies to: None


i64_tos(buf byteptr, len int, n0 i64, base int) string


Tags:

Applies to: None


i64() i64


Tags:

Applies to: string


i8() i8


Tags:

Applies to: string


index_after(p string, start int) int


Tags:

Applies to: string


index_after(p ustring, start int) int


Tags:

Applies to: ustring


index_any(chars string) int


Tags:

Applies to: string


index_byte(c byte) int


Tags:

Applies to: string


index_old(p string) int


Tags:

Applies to: string


index(p string) ?int


Tags:

Applies to: string


index(p string) int


Tags:

Applies to: string


index(v byte) int

returns the index of the first element equal to the given value, or -1 if the value is not found in the array

Tags: array

Applies to: []byte


index(v char) int

returns the index of the first element equal to the given value, or -1 if the value is not found in the array

Tags: array

Applies to: []char


index(v int) int

returns the index of the first element equal to the given value, or -1 if the value is not found in the array

Tags: array

Applies to: []int


index(v string) int

returns the index of the first element equal to the given value, or -1 if the value is not found in the array

Tags: array

Applies to: []string


insert(i int, val voidptr)

TODO array.insert is broken
Cannot pass literal or primitive type as it cannot be cast to voidptr.
In the current state only that would work:
i := 3
a.insert(0, &i)

Tags: array

Applies to: array


int() int


Tags:

Applies to: string


is_atty(fd int) int


Tags:

Applies to: None


is_bin_digit() bool


Tags:

Applies to: byte


is_capital() bool


Tags:

Applies to: byte,string


is_digit() bool


Tags:

Applies to: byte


is_hex_digit() bool


Tags:

Applies to: byte


is_letter() bool


Tags:

Applies to: byte


is_lower() bool


Tags:

Applies to: string


is_oct_digit() bool


Tags:

Applies to: byte


is_space() bool


Tags:

Applies to: byte


is_title() bool


Tags:

Applies to: string


is_upper() bool


Tags:

Applies to: string


is_white() bool


Tags:

Applies to: byte


isnil(p voidptr) bool

returns true if an object is nil (only for C objects)

Tags:

Applies to: None


isnil(v voidptr) bool


Tags:

Applies to: None


join_lines() string


Tags:

Applies to: []string


join(del string) string


Tags:

Applies to: []string


keys() []string


Tags: map

Applies to: &SortedMap,&map,map


last_index_byte(c byte) int


Tags:

Applies to: string


last_index(p string) ?int


Tags:

Applies to: string


last_index(p string) int


Tags:

Applies to: string


last() voidptr

returns the last element of the array

Tags: array

Applies to: array


left(n int) array


Tags:

Applies to: array


left(n int) string

'hello'.left(2) => 'he'

Tags:

Applies to: string


left(pos int) string


Tags:

Applies to: ustring


limit(max int) string


Tags:

Applies to: string


make(len, cap, elm_size int) array


Tags:

Applies to: None


malloc(n int) byteptr


Tags:

Applies to: None


mem_copy(dest0 voidptr, src0 voidptr, n int) voidptr


Tags:

Applies to: None


memdup(src voidptr, sz int) voidptr


Tags:

Applies to: None


mm_alloc(size u64) (byteptr, Errno)


Tags:

Applies to: None


mm_alloc(size u64) (voidptr, Errno)


Tags:

Applies to: None


mm_free(addr byteptr) Errno


Tags:

Applies to: None


mm_pages(size u64) u32


Tags:

Applies to: None


nebit(b f32) bool


Tags:

Applies to: f32


nebit(b f64) bool


Tags:

Applies to: f64


normal_run (op fn(), label string) int


Tags:

Applies to: None


panic(s string)

print message, backtrace and exit

Tags:

Applies to: None


pointers() []voidptr

returns a new array, where each element is the address of the corresponding element in a

Tags: array

Applies to: array


prepend(val voidptr)

TODO array.prepend is broken
It depends on array.insert

Tags: array

Applies to: array


print_backtrace()

at the time of backtrace_symbols_fd call, the C stack would look something like this:
1 frame for print_backtrace_skipping_top_frames
1 frame for print_backtrace itself
... print the rest of the backtrace frames ...
=> top 2 frames should be skipped, since they will not be informative to the developer

Tags:

Applies to: None


print()


Tags: map

Applies to: SortedMap,map


print(s string)


Tags:

Applies to: None


println(s string)


Tags:

Applies to: None


ptr_str(ptr voidptr) string

old function for reference

Tags:

Applies to: None


push_many(val voidptr, size int)

`val` is array.data
TODO make private, right now it's used by strings.Builder

Tags: array

Applies to: array


reduce(iter fn(accum, curr int)int, accum_start int) int

reduce executes a given reducer function on each element of the array, resulting in a single output value

Tags: array

Applies to: []int


repeat(count int) array

returns new array with the given array elements repeated given times

Tags: array

Applies to: array


repeat(count int) string

returns a new string with a specified number of copies of the string it was called on.

Tags:

Applies to: string


repeat(nr_repeats int) array

returns new array with the given array elements repeated `nr_repeat` times

Tags: array

Applies to: array


replace_each(vals []string) string


Tags:

Applies to: string


replace_once(rep, with string) string


Tags:

Applies to: string


replace(rep, with string) string


Tags:

Applies to: string


replace(rep, with_ string) string


Tags:

Applies to: string


reverse() array

returns a new array with the elements of the original array in reverse order

Tags: array

Applies to: array


reverse() string


Tags:

Applies to: string


right(n int) array


Tags: array

Applies to: array


right(n int) string

'hello'.right(2) => 'llo'

Tags:

Applies to: string


right(pos int) string


Tags:

Applies to: ustring


run (op fn(), label string, code Wi_si_code, status int) int


Tags:

Applies to: None


slice(start, _end int) array


Tags: array

Applies to: array


sort_by_len()


Tags:

Applies to: []string


sort_ignore_case()


Tags:

Applies to: []string


sort_with_compare(compare voidptr)

sorts array in-place using given `compare` function as comparator

Tags: array

Applies to: array


sort()

sorts array of int in place in ascending order

Tags: array

Applies to: []int,[]string


split_into_lines() []string


Tags:

Applies to: string


split_nth(delim string, nth int) []string


Tags:

Applies to: string


split(delim string) []string


Tags:

Applies to: string


starts_with(p string) bool


Tags:

Applies to: string


str_l(max int) string


Tags:

Applies to: int


str() string

returns a string representation of the array of strings => '["a", "b", "c"]'

Tags: array

Applies to: Option,Test,Test2,[]Test2,[]string,bool,byte,f32,f64,i16,i64,i8,int,map_string,rune,string,u16,u32,u64,ustring


str1() string

old function for reference

Tags:

Applies to: int


string_eq (s1, s2 string) bool


Tags:

Applies to: None


string_from_wide(_wstr &u16) string


Tags: utf

Applies to: None


string_from_wide2(_wstr &u16, len int) string


Tags: utf

Applies to: None


string_ne (s1, s2 string) bool


Tags:

Applies to: None


strip_margin_custom(del byte) string


Tags:

Applies to: string


strip_margin() string

Allows multi-line strings to be formatted in a way that removes white-space
before a delimeter. by default `|` is used.
Note: the delimiter has to be a byte at this time. That means surrounding
the value in ``.

Example:
st := 'Hello there,
      |this is a string,
      |    Everything before the first | is removed'.strip_margin()
Returns:
Hello there,
this is a string,
    Everything before the first | is removed

Tags:

Applies to: string


strlen(s byteptr) int


Tags:

Applies to: None


strlong() string

return a decimal notation of the input f32

Tags:

Applies to: f32,f64


strsci(digit_num int) string

return a string of the input f32 in scientific notation with digit_num deciamals displayed, max 8 digits

Tags:

Applies to: f32,f64


substr(_start, _end int) string


Tags:

Applies to: ustring


substr(start, end int) string


Tags:

Applies to: string


sys_close(fd i64) Errno


Tags:

Applies to: None


sys_dup2 (oldfd, newfd int) (i64, Errno)


Tags:

Applies to: None


sys_execve(filename byteptr, argv []byteptr, envp []byteptr) int


Tags:

Applies to: None


sys_exit (ec int)


Tags:

Applies to: None


sys_fork() int


Tags:

Applies to: None


sys_getpid() int


Tags:

Applies to: None


sys_getuid() int


Tags:

Applies to: None


sys_madvise(addr voidptr, len u64, advice int) Errno


Tags:

Applies to: None


sys_mmap(addr byteptr, len u64, prot Mm_prot, flags Map_flags, fildes u64, off u64) (byteptr, Errno)


Tags:

Applies to: None


sys_munmap(addr voidptr, len u64) Errno


Tags:

Applies to: None


sys_open(filename byteptr, flags Fcntl, mode int) (i64, Errno)


Tags:

Applies to: None


sys_pipe(filedes &int) Errno


Tags:

Applies to: None


sys_read (fd i64, buf byteptr, count u64) (i64, Errno)


Tags:

Applies to: None


sys_sched_yield() Errno


Tags:

Applies to: None


sys_vfork() int


Tags:

Applies to: None


sys_waitid (which Wi_which, pid int, infop &int, options Wp_sys, ru voidptr) Errno


Tags:

Applies to: None


sys_write(fd i64, buf byteptr, count u64) (i64, Errno)


Tags:

Applies to: None


title() string


Tags:

Applies to: string


to_c() voidptr


Tags:

Applies to: []string


to_lower() string

TODO only works with ASCII

Tags:

Applies to: string


to_upper() string


Tags:

Applies to: string


to_wide() &u16


Tags: utf

Applies to: string


tos_clone(s byteptr) string


Tags:

Applies to: None


tos(s byteptr, len int) string

Converts a C string to a V string. String data is reused, not copied.

Tags:

Applies to: None


tos(s byteptr) string


Tags:

Applies to: None


tos2(s byteptr) string

Same as `tos`, but calculates the length. Called by `string(bytes)` casts.
Used only internally.

Tags:

Applies to: None


tos3(s charptr) string

Same as `tos2`, but for char*, to avoid warnings

Tags:

Applies to: None


trim_left(cutset string) string


Tags:

Applies to: string


trim_right(cutset string) string


Tags:

Applies to: string


trim_space() string


Tags:

Applies to: string


trim(cutset string) string


Tags:

Applies to: string


trim(index int)

trims the array length to "index" without modifying the allocated data. If "index" is greater than len nothing will be changed

Tags: array

Applies to: array


u16() u16


Tags: utf

Applies to: string


u32() u32


Tags: utf

Applies to: string


u64() u64


Tags: utf

Applies to: string


ustring_tmp() ustring


Tags:

Applies to: string


ustring() ustring


Tags:

Applies to: string


utf32_code() int

Convert utf8 to utf32

Tags: utf

Applies to: string


utf32_to_str_no_malloc(code u32, buf voidptr) string


Tags: utf

Applies to: None


utf32_to_str(code u32) string

Convert utf32 to utf8
utf32 == Codepoint

Tags: utf

Applies to: None


utf8_char_len(b byte) int


Tags: utf

Applies to: None


utf8_getchar() int

Reads an utf8 character from standard input

Tags: utf

Applies to: None


v_calloc(n int) byteptr


Tags:

Applies to: None


vcalloc(n int) byteptr


Tags:

Applies to: None


vstrlen(s byteptr) int


Tags:

Applies to: None


vsyscall(id int


Tags:

Applies to: None

arrays


range<T>(start, end T) []T


Tags: array

Applies to: None

benchmark


fail_many(n int)


Tags: bench

Applies to: Benchmark


fail()


Tags: bench

Applies to: Benchmark


measure(label string) i64


Tags: bench

Applies to: Benchmark


neither_fail_nor_ok()


Tags: bench

Applies to: Benchmark


new_benchmark_no_cstep() Benchmark


Tags: bench

Applies to: None


new_benchmark_pointer() &Benchmark


Tags: bench

Applies to: None


new_benchmark() Benchmark


Tags: bench

Applies to: None


ok_many(n int)


Tags: bench

Applies to: Benchmark


ok()


Tags: bench

Applies to: Benchmark


set_total_expected_steps(n int)


Tags: bench

Applies to: Benchmark


skip()


Tags: bench

Applies to: Benchmark


start() Benchmark


Tags: bench

Applies to: None


step_message_fail(msg string) string


Tags: bench

Applies to: &Benchmark


step_message_ok(msg string) string


Tags: bench

Applies to: &Benchmark


step_message_skip(msg string) string


Tags: bench

Applies to: &Benchmark


step_message_with_label(label string, msg string) string


Tags: bench

Applies to: &Benchmark


step_message(msg string) string


Tags: bench

Applies to: &Benchmark


step()


Tags: bench

Applies to: Benchmark


stop()


Tags: bench

Applies to: Benchmark


total_duration() i64

returns the duration in ms

Tags: bench

Applies to: &Benchmark


total_message(msg string) string


Tags: bench

Applies to: &Benchmark

bitfield


bfand(input1 BitField, input2 BitField) BitField

performs logical AND operation on every pair of bits from 'input1' and 'input2' and returns the result as a new array. If inputs differ in size, the tail of the longer one is ignored.

Tags: bits

Applies to: None


bfnot(input BitField) BitField

toggles all bits in a bit array and returns the result as a new array.

Tags: bits

Applies to: None


bfor(input1 BitField, input2 BitField) BitField

performs logical OR operation on every pair of bits from 'input1' and 'input2' and returns the result as a new array. If inputs differ in size, the tail of the longer one is ignored.

Tags: bits

Applies to: None


bfxor(input1 BitField, input2 BitField) BitField

perform logical XOR operation on every pair of bits from 'input1' and 'input2' and returns the result as a new array. If inputs differ in size, the tail of the longer one is ignored.

Tags: bits

Applies to: None


clearall()

clears (sets to zero) all bits in the array.

Tags: bits

Applies to: BitField


clearbit(bitnr int)

clears (sets to zero) bit number 'bit_nr' (count from 0).

Tags: bits

Applies to: BitField


clone() BitField

creates a copy of a bit array.

Tags: bits

Applies to: BitField


cmp(input BitField) bool

compares two bit arrays bit by bit and returns 'true' if they are identical by length and contents and 'false' otherwise.

Tags: bits

Applies to: BitField


del(instance *BitField)


Tags: bits

Applies to: None


from_bytes(input []byte) BitField

converts a byte array into a bitfield

Tags: bits

Applies to: None


from_str(input string) BitField

converts a string of characters ('0' and '1') to a bit array. Any character different from '0' is treated as '1'.

Tags: bits

Applies to: None


getbit(bitnr int) int

returns the value (0 or 1) of bit number 'bit_nr' (count from 0).

Tags: bits

Applies to: BitField


getsize() int

returns the number of bits the array can hold.

Tags: bits

Applies to: BitField


hamming (input1 BitField, input2 BitField) int

computes the Hamming distance between two bit arrays.

Tags: bits

Applies to: None


join(input1 BitField, input2 BitField) BitField

concatenates two bit arrays and return the result as a new array.

Tags: bits

Applies to: None


new(size int) BitField

creates an empty bit array of capable of storing 'size' bits

Tags: bits

Applies to: None


popcount() int

returns the number of set bits (ones) in the array.

Tags: bits

Applies to: BitField


pos(needle BitField) int

checks if the array contains a sub-array 'needle' and returns its position if it does, -1 if it does not, and -2 on error.

Tags: bits

Applies to: BitField


resize(new_size int)

changes the size of the bit array to 'new_size'.

Tags: bits

Applies to: BitField


reverse() BitField

reverses the order of bits in the array (swap the first with the  last, the second with the last but one and so on).

Tags: bits

Applies to: BitField


rotate(offset int) BitField

circular-shifts the bits by 'offset' positions (move 'offset' bit to 0, 'offset+1' bit to 1, and so on).

Tags: bits

Applies to: BitField


setall()

sets all bits in the array to 1.

Tags: bits

Applies to: BitField


setbit(bitnr int)

sets bit number 'bit_nr' to 1 (count from 0).

Tags: bits

Applies to: BitField


slice(_start int, _end int) BitField

returns a sub-array of bits between 'start_bit_nr' (included) and 'end_bit_nr' (excluded).

Tags: bits

Applies to: BitField


str() string

str converts the bit array to a string of characters ('0' and '1') and return the string

Tags: bits

Applies to: BitField


togglebit(bitnr int)

changes the value (from 0 to 1 or from 1 to 0) of bit number 'bit_nr'.

Tags: bits

Applies to: BitField

cli


add_command(command Command)


Tags: cli

Applies to: Command


add_flag(flag Flag)


Tags: cli

Applies to: Command


full_name() string


Tags: cli

Applies to: Command


get_bool(name string) ?bool


Tags: cli

Applies to: []Flag


get_bool_or(name string, or_value bool) bool


Tags: cli

Applies to: []Flag


get_float(name string) ?f32


Tags: cli

Applies to: []Flag


get_float_or(name string, or_value f32) f32


Tags: cli

Applies to: []Flag


get_int(name string) ?int


Tags: cli

Applies to: []Flag


get_int_or(name string, or_value int) int


Tags: cli

Applies to: []Flag


get_string(name string) ?string


Tags: cli

Applies to: []Flag


get_string_or(name string, or_value string) string


Tags: cli

Applies to: []Flag


parse(args []string)


Tags: cli

Applies to: Command


root() Command


Tags: cli

Applies to: Command

clipboard


check_ownership() bool

check if we own the clipboard

Tags: clipboard

Applies to: Clipboard


clear_all()

clear the clipboard

Tags: clipboard

Applies to: Clipboard


copy(text string) bool

copy some text into the clipboard

Tags: clipboard

Applies to: Clipboard


destroy()

destroy the clipboard

Tags: clipboard

Applies to: Clipboard


is_available() bool

check if clipboard can be used

Tags: clipboard

Applies to: &Clipboard


new_primary() &Clipboard


Tags: clipboard

Applies to: None


new() &Clipboard

create a new clipboard

Tags: clipboard

Applies to: None


paste() string

get the text from the clipboard

Tags: clipboard

Applies to: Clipboard

crypto.aes


block_size() int


Tags: crypto, aes

Applies to: &AesCbc,&AesCipher


decrypt_blocks(dst mut []byte, src []byte)


Tags: crypto, aes

Applies to: AesCbc


decrypt(dst, src []byte)


Tags: crypto, aes

Applies to: &AesCipher


encrypt_blocks(dst mut []byte, src_ []byte)


Tags: crypto, aes

Applies to: &AesCbc


encrypt(dst, src []byte)


Tags: crypto, aes

Applies to: &AesCipher


new_cbc(b AesCipher, iv []byte) AesCbc

returns a BlockMode which encrypts in cipher block chaining mode, using the given Block. The length of iv must be the same as the Block's block size.

Tags: crypto, aes

Applies to: None


new_cipher(key []byte) AesCipher

creates and returns a new cipher.Block.
The key argument should be the AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.

Tags: crypto, aes

Applies to: None

crypto.cipher


safe_xor_bytes(dst mut []byte, a, b []byte, n int)

n needs to be smaller or equal than the length of a and b.

Tags: crypto

Applies to: None


xor_bytes(dst mut []byte, a, b []byte) int

xors the bytes in a and b. The destination should have enough space, otherwise xor_bytes will panic. Returns the number of bytes xor'd.

Tags: crypto

Applies to: None


xor_words(dst mut []byte, a, b []byte)

XORs multiples of 4 or 8 bytes (depending on architecture.)
The slice arguments a and b are assumed to be of equal length.

Tags: crypto

Applies to: None

crypto.internal.subtle


any_overlap(x, y []byte) bool

reports whether x and y share memory at any (not necessarily corresponding) index. The memory beyond the slice length is ignored.

Tags: crypto

Applies to: None


inexact_overlap(x, y []byte) bool

reports whether x and y share memory at any non-corresponding index. The memory beyond the slice length is ignored. Note that x and y can have different lengths and still not have any inexact overlap.
inexact_overlap can be used to implement the requirements of the crypto/cipher AEAD, Block, BlockMode and Stream interfaces.

Tags: crypto

Applies to: None

crypto.md5


block_size() int


Tags: crypto, md5

Applies to: &Digest


checksum() []byte


Tags: crypto, md5

Applies to: Digest


hexhash(s string) string


Tags: crypto, md5

Applies to: None


new() &Digest

returns a new Digest (implementing hash.Hash) computing the MD5 checksum.

Tags: crypto, md5

Applies to: None


size() int


Tags: crypto, md5

Applies to: &Digest


sum(b_in []byte) []byte


Tags: crypto, md5

Applies to: &Digest


sum(data []byte) []byte

returns the MD5 checksum of the data.

Tags: crypto, md5

Applies to: None


write(p_ []byte) int


Tags: crypto, md5

Applies to: Digest

crypto.rand


int_u64(max u64) ?u64


Tags: crypto

Applies to: None


read(bytes_needed int) ?[]byte


Tags: crypto

Applies to: None

crypto.rc4


new_cipher(key []byte) ?Cipher

creates and returns a new Cipher. The key argument should be the RC4 key, at least 1 byte and at most 256 bytes.

Tags: crypto, rc4

Applies to: None


reset()

zeros the key data and makes the Cipher unusable.good to com
Deprecated: Reset can't guarantee that the key will be entirely removed from the process's memory.

Tags: crypto, rc4

Applies to: Cipher


xor_key_stream(dst mut []byte, src []byte)

sets dst to the result of XORing src with the key stream.
Dst and src must overlap entirely or not at all.

Tags: crypto, rc4

Applies to: Cipher

crypto.sha1


block_size() int


Tags: crypto, sha1

Applies to: &Digest


hexhash(s string) string


Tags: crypto, sha1

Applies to: None


new() &Digest

returns a new Digest (implementing hash.Hash) computing the SHA1 checksum.

Tags: crypto, sha1

Applies to: None


size() int


Tags: crypto, sha1

Applies to: &Digest


sum(b_in []byte) []byte


Tags: crypto, sha1

Applies to: &Digest


sum(data []byte) []byte

returns the SHA-1 checksum of the data.

Tags: crypto, sha1

Applies to: None


write(p_ []byte) int


Tags: crypto, sha1

Applies to: Digest

crypto.sha256


block_size() int


Tags: crypto, sha256

Applies to: &Digest


hexhash_224(s string) string


Tags: crypto, sha256

Applies to: None


hexhash(s string) string


Tags: crypto, sha256

Applies to: None


new() &Digest

returns a new Digest (implementing hash.Hash) computing the SHA256 checksum.

Tags: crypto, sha256

Applies to: None


new224() &Digest

returns a new Digest (implementing hash.Hash) computing the SHA224 checksum.

Tags: crypto, sha256

Applies to: None


size() int


Tags: crypto, sha256

Applies to: &Digest


sum(data []byte) []byte

returns the SHA256 checksum of the data.

Tags: crypto, sha256

Applies to: None


sum224(data []byte) []byte

returns the SHA224 checksum of the data.

Tags: crypto, sha256

Applies to: None


sum256(data []byte) []byte

returns the SHA256 checksum of the data.

Tags: crypto, sha256

Applies to: None

crypto.sha512


block_size() int


Tags: crypto, sha512

Applies to: &Digest


hexhash_384(s string) string


Tags: crypto, sha512

Applies to: None


hexhash_512_224(s string) string


Tags: crypto, sha512

Applies to: None


hexhash_512_256(s string) string


Tags: crypto, sha512

Applies to: None


hexhash(s string) string


Tags: crypto, sha512

Applies to: None


new() &Digest

returns a new Digest (implementing hash.Hash) computing the SHA-512 checksum.

Tags: crypto, sha512

Applies to: None


size() int


Tags: crypto, sha512

Applies to: &Digest


sum384(data []byte) []byte

returns the SHA384 checksum of the data.

Tags: crypto, sha512

Applies to: None


sum512_224(data []byte) []byte

returns the Sum512/224 checksum of the data.

Tags: crypto, sha512

Applies to: None


sum512_256(data []byte) []byte

returns the Sum512/256 checksum of the data.

Tags: crypto, sha512

Applies to: None


sum512(data []byte) []byte

returns the SHA512 checksum of the data.

Tags: crypto, sha512

Applies to: None

darwin


nsstring(s string) *C.NSString


Tags:

Applies to: None


nsstring(s string) voidptr


Tags:

Applies to: None


resource_path() string


Tags:

Applies to: None

dl


close(handle voidptr) bool

close frees a given shared object.

Tags:

Applies to: None


open(filename string, flags int) voidptr

open loads the dynamic shared object.

Tags:

Applies to: None


sym(handle voidptr, symbol string) voidptr

returns an address of a symbol in a given shared object.

Tags:

Applies to: None

encoding.base64


decode_in_buffer(data &string, buffer byteptr) int


Tags:

Applies to: None


decode(data string) string


Tags:

Applies to: None


encode_in_buffer(data &string, buffer byteptr) int


Tags:

Applies to: None


encode(data string) string


Tags:

Applies to: None

encoding.binary


big_endian_put_u16(b mut []byte, v u16)


Tags:

Applies to: None


big_endian_put_u32(b mut []byte, v u32)


Tags:

Applies to: None


big_endian_put_u64(b mut []byte, v u64)


Tags:

Applies to: None


big_endian_u16(b []byte) u16


Tags:

Applies to: None


big_endian_u32(b []byte) u32


Tags:

Applies to: None


big_endian_u64(b []byte) u64


Tags:

Applies to: None


little_endian_put_u16(b mut []byte, v u16)


Tags:

Applies to: None


little_endian_put_u32(b mut []byte, v u32)


Tags:

Applies to: None


little_endian_put_u64(b mut []byte, v u64)


Tags:

Applies to: None


little_endian_u16(b []byte) u16


Tags:

Applies to: None


little_endian_u32(b []byte) u32


Tags:

Applies to: None


little_endian_u64(b []byte) u64


Tags:

Applies to: None

encoding.csv


read_all() ?[][]string

Once we have multi dimensional array

Tags: encoding, csv

Applies to: Reader


write_all(records [][]string)

Once we have multi dimensional array

Tags: encoding, csv

Applies to: &Writer


new_reader(data string) &Reader


Tags: encoding, csv

Applies to: None


new_writer() &Writer


Tags: encoding, csv

Applies to: None


read() ?[]string

reads one row from the csv file

Tags: encoding, csv

Applies to: Reader


str() string


Tags: encoding, csv

Applies to: Writer


write(record []string) ?bool

writes a single record

Tags: encoding, csv

Applies to: Writer

encoding.utf8


get_uchar(s string, index int) int

convert a unicode glyph in string[index] into a int unicode char

Tags: encoding, utf

Applies to: None


is_global_punct( s string , index int) bool

return true if the string[index] byte of is the start of a global unicode punctuation

Tags: encoding, utf

Applies to: None


is_punct( s string , index int) bool

return true if the string[index] byte is the start of a unicode western punctuation

Tags: encoding, utf

Applies to: None


is_uchar_global_punct( uchar int ) bool

return true if the input unicode is a global unicode punctuation

Tags: encoding, utf

Applies to: None


is_uchar_punct( uchar int ) bool

return true if the input unicode is a western unicode punctuation

Tags: encoding, utf

Applies to: None


len(s string) int

return the length as number of unicode chars from a string

Tags: encoding, utf

Applies to: None


to_lower(s string) string

return an lowercase string from a string

Tags: encoding, utf

Applies to: None


to_upper(s string) string

return an uppercase string from a string

Tags: encoding, utf

Applies to: None


u_len(s ustring) int

return the length as number of unicode chars from a ustring

Tags: encoding, utf

Applies to: None


u_to_lower(s ustring) ustring

return an lowercase string from a ustring

Tags: encoding, utf

Applies to: None


u_to_upper(s ustring) ustring

return an uppercase string from a ustring

Tags: encoding, utf

Applies to: None

eventbus


clear_all()


Tags: event

Applies to: &EventBus


has_subscriber(name string) bool


Tags: event

Applies to: &EventBus


is_subscribed(name string) bool


Tags: event

Applies to: &Subscriber


new() &EventBus


Tags: event

Applies to: None


publish(name string, sender voidptr, args voidptr)


Tags: event

Applies to: &EventBus


subscribe_method(name string, handler EventHandlerFn, receiver voidptr)


Tags: event

Applies to: Subscriber


subscribe_once(name string, handler EventHandlerFn)


Tags: event

Applies to: Subscriber


subscribe(name string, handler EventHandlerFn)


Tags: event

Applies to: Subscriber


unsubscribe(name string, handler EventHandlerFn)


Tags: event

Applies to: Subscriber

flag


application(name string)

change the application name to be used in 'usage' output

Tags:

Applies to: FlagParser


arguments_description(description string)


Tags:

Applies to: FlagParser


bool_opt(name string, abbr byte, usage string) ?bool

returns an optional that returns the value associated with the flag.
In the situation that the flag was not provided, it returns null.

Tags:

Applies to: FlagParser


bool(name string, abbr byte, bdefault bool, usage string) bool

defining and parsing a bool flag
 if defined
     the value is returned (true/false)
 else
     the default value is returned
version with abbr

Tags:

Applies to: FlagParser


description(desc string)

change the application version to be used in 'usage' output

Tags:

Applies to: FlagParser


finalize() ?[]string

finalize argument parsing -> call after all arguments are defined
all remaining arguments are returned in the same order they are defined on
command line
If additional flag are found (things starting with '--') an error is returned
error handling is up to the application developer

Tags:

Applies to: FlagParser


float_multi(name string, abbr byte, usage string) []f64

returns all instances of values associated with the flags provided
In the case that none were found, it returns an empty array.

Tags:

Applies to: FlagParser


float_opt(name string, abbr byte, usage string) ?f64

returns an optional that returns the value associated with the flag.
In the situation that the flag was not provided, it returns null.

Tags:

Applies to: FlagParser


float(name string, abbr byte, fdefault f64, usage string) f64

defining and parsing a float flag
 if defined
     the value is returned (float)
 else
     the default value is returned
version with abbr

Tags:

Applies to: FlagParser


int_multi(name string, abbr byte, usage string) []int

returns all instances of values associated with the flags provided
In the case that none were found, it returns an empty array.

Tags:

Applies to: FlagParser


int_opt(name string, abbr byte, usage string) ?int

returns an optional that returns the value associated with the flag.
In the situation that the flag was not provided, it returns null.

Tags:

Applies to: FlagParser


int(name string, abbr byte, idefault int, usage string) int

defining and parsing an int flag
 if defined
     the value is returned (int)
 else
     the default value is returned
version with abbr

Tags:

Applies to: FlagParser


limit_free_args_to_at_least(n int)


Tags:

Applies to: FlagParser


limit_free_args_to_exactly(n int)


Tags:

Applies to: FlagParser


limit_free_args(min, max int)

this will cause an error in finalize() if free args are out of range (min, ..., max)

Tags:

Applies to: FlagParser


new_flag_parser(args []string) &FlagParser

create a new flag set for parsing command line arguments
TODO use INT_MAX some how

Tags:

Applies to: None


skip_executable()

in most cases you do not need the first argv for flag parsing

Tags:

Applies to: FlagParser


str() string


Tags:

Applies to: Flag,[]Flag


string_multi(name string, abbr byte, usage string) []string

returns all instances of values associated with the flags provided
In the case that none were found, it returns an empty array.

Tags:

Applies to: FlagParser


string_opt(name string, abbr byte, usage string) ?string

returns an optional that returns the value associated with the flag.
In the situation that the flag was not provided, it returns null.

Tags:

Applies to: FlagParser


string(name string, abbr byte, sdefault string, usage string) string

defining and parsing a string flag
 if defined
     the value is returned (string)
 else
     the default value is returned
version with abbr

Tags:

Applies to: FlagParser


usage() string

collect all given information

Tags:

Applies to: FlagParser


version(vers string)

change the application version to be used in 'usage' output

Tags:

Applies to: FlagParser

fontstash


add_fallback_font(base int, fallback int) int


Tags:

Applies to: &C.FONScontext


add_font_mem(name byteptr, data byteptr, data_size int, free_data int) int


Tags:

Applies to: &C.FONScontext


clear_state()


Tags:

Applies to: &C.FONScontext


create_internal(params &C.FONSparams) &C.FONScontext

Contructor

Tags:

Applies to: None


delete_internal(s &C.FONScontext)

destructor

Tags:

Applies to: None


draw_debug(x f32, y f32)

Draws the stash texture for debugging

Tags:

Applies to: &C.FONScontext


draw_text(x f32, y f32, str byteptr, end byteptr) f32

Draw text

Tags:

Applies to: &C.FONScontext


expand_atlas(width int, height int) int

Expands the atlas size.

Tags:

Applies to: &C.FONScontext


get_atlas_size(width &int, height &int)

Returns current atlas size.

Tags:

Applies to: &C.FONScontext


get_font_by_name(name byteptr) int


Tags:

Applies to: &C.FONScontext


get_texture_data(width &int, height &int) byteptr


Tags:

Applies to: &C.FONScontext


line_bounds(y f32, miny &f32, maxy &f32)


Tags:

Applies to: &C.FONScontext


pop_state()


Tags:

Applies to: &C.FONScontext


push_state()


Tags:

Applies to: &C.FONScontext


reset_atlas(width int, height int) int

Resets the whole stash.

Tags:

Applies to: &C.FONScontext


set_align(align int)


Tags:

Applies to: &C.FONScontext


set_blur(blur f32)


Tags:

Applies to: &C.FONScontext


set_color(color u32)


Tags:

Applies to: &C.FONScontext


set_error_callback(callback fn(uptr voidptr, error int, val int), uptr voidptr)


Tags:

Applies to: &C.FONScontext


set_font(font int)


Tags:

Applies to: &C.FONScontext


set_size(size f32)


Tags:

Applies to: &C.FONScontext


set_spacing(spacing f32)


Tags:

Applies to: &C.FONScontext


text_bounds(x f32, y f32, str byteptr, end byteptr, bounds &f32) f32


Tags:

Applies to: &C.FONScontext


text_iter_init(iter &C.FONStextIter, x f32, y f32, str byteptr, end byteptr) int


Tags:

Applies to: &C.FONScontext


text_iter_next(iter &C.FONStextIter, quad &C.FONSquad) int


Tags:

Applies to: &C.FONScontext


validate_texture(dirty &int) int


Tags:

Applies to: &C.FONScontext


vert_metrics(ascender &f32, descender &f32, lineh &f32)


Tags:

Applies to: &C.FONScontext

freetype


draw_text_def(x, y int, text string)


Tags:

Applies to: FreeType


draw_text(_x, _y int, text string, cfg gx.TextCfg)


Tags:

Applies to: FreeType


new_context(cfg gg.Cfg) &FreeType


Tags:

Applies to: None


str() string


Tags:

Applies to: FT_Face,[]Character


text_height(s string) int


Tags:

Applies to: FreeType


text_size(s string) (int, int)


Tags:

Applies to: FreeType


text_width(s string) int


Tags:

Applies to: FreeType

gg


circle(x, y, r int)


Tags:

Applies to: GG


clear(color gx.Color)


Tags:

Applies to: None


create_image_from_memory(buf byteptr) u32


Tags:

Applies to: None


create_image(file string) u32


Tags:

Applies to: &GG,None


draw_arc(x, y, r, start_angle, end_angle f32, segments int, color gx.Color)


Tags:

Applies to: &GG


draw_circle(x, y, r f32, color gx.Color)


Tags:

Applies to: &GG


draw_empty_rect(x, y, w, h f32, color gx.Color)


Tags:

Applies to: &GG


draw_empty_rounded_rect(x, y, w, h, r f32, color gx.Color)


Tags:

Applies to: &GG


draw_filled_arc(x, y, r, start_angle, end_angle f32, segments int, color gx.Color)


Tags:

Applies to: &GG


draw_gray_line(x, y, x2, y2 f32)


Tags:

Applies to: &GG


draw_image(x, y, w, h f32, tex_id u32)


Tags:

Applies to: &GG


draw_line(x, y, x2, y2 f32, color gx.Color)


Tags:

Applies to: &GG


draw_rect(x, y, w, h f32, c gx.Color)


Tags:

Applies to: &GG


draw_rect2(x, y, w, h f32, c gx.Color)


Tags:

Applies to: &GG


draw_rounded_rect(x, y, w, h, r f32, color gx.Color)


Tags:

Applies to: &GG


draw_triangle_tex(x1, y1, x2, y2, x3, y3 f32, c gx.Color)


Tags:

Applies to: &GG


draw_triangle(x1, y1, x2, y2, x3, y3 f32, c gx.Color)


Tags:

Applies to: &GG


draw_vertical(x, y, height int)


Tags:

Applies to: &GG


init_gg()


Tags:

Applies to: None


new_context(cfg Cfg) &GG


Tags:

Applies to: None


post_empty_event()


Tags:

Applies to: None


render_loop() bool


Tags:

Applies to: &GG


render()


Tags:

Applies to: &GG


scissor(x, y, w, h f32)


Tags:

Applies to: None


set_mode_fill()


Tags:

Applies to: None


set_mode_point()


Tags:

Applies to: None


set_mode_wireframe()


Tags:

Applies to: None


str() string


Tags:

Applies to: Vec2


vec2(x, y int) Vec2


Tags:

Applies to: None

gg2


begin()


Tags:

Applies to: &GG


create_image_from_memory(buf byteptr) u32


Tags:

Applies to: None


create_image(file string) u32


Tags:

Applies to: None


draw_empty_rect(x, y, w, h f32, c gx.Color)


Tags:

Applies to: &GG


draw_line(x, y, x2, y2 f32, color gx.Color)


Tags:

Applies to: &GG


draw_rect(x, y, w, h f32, c gx.Color)


Tags:

Applies to: &GG,None


draw_text_def(x, y int, text string)


Tags:

Applies to: &GG


draw_text(x, y int, text string, cfg gx.TextCfg)


Tags:

Applies to: &GG


end()


Tags:

Applies to: &GG


init_font()


Tags:

Applies to: GG


new_context(cfg Config) &GG


Tags:

Applies to: None


run()


Tags:

Applies to: &GG


wait_events()


Tags:

Applies to: None

gl


active_texture(t int)


Tags:

Applies to: None


attach_shader(program, shader int)


Tags:

Applies to: None


bind_2d_texture(texture u32)


Tags:

Applies to: None


bind_buffer(typ int, vbo u32)


Tags:

Applies to: None


bind_vao(vao u32)


Tags:

Applies to: None


buffer_data_f32(typ int, vertices []f32, draw_typ int)


Tags:

Applies to: None


buffer_data_int(typ int, vertices []int, draw_typ int)


Tags:

Applies to: None


buffer_data(typ, size int, arr voidptr, draw_typ int)


Tags:

Applies to: None


clear_color(r, g, b, a int)


Tags:

Applies to: None


clear()


Tags:

Applies to: None


compile_shader(shader int)


Tags:

Applies to: None


create_program() int


Tags:

Applies to: None


create_shader(typ int) int


Tags:

Applies to: None


delete_shader(shader int)


Tags:

Applies to: None


delete_texture(texture u32)


Tags:

Applies to: None


disable(val int)


Tags:

Applies to: None


draw_arrays(typ, start, len int)


Tags:

Applies to: None


draw_elements(mode, count, typ, indices int)


Tags:

Applies to: None


enable_vertex_attrib_array(n int)


Tags:

Applies to: None


enable(val int)


Tags:

Applies to: None


gen_buffer() u32


Tags:

Applies to: None


gen_texture() u32


Tags:

Applies to: None


gen_vertex_array() u32


Tags:

Applies to: None


generate_mipmap(typ int)


Tags:

Applies to: None


get_program_info_log(program int) string


Tags:

Applies to: None


get_program_link_status(program int) int


Tags:

Applies to: None


init_glad()


Tags:

Applies to: None


link_program(program int)


Tags:

Applies to: None


new_shader(name string) Shader


Tags:

Applies to: None


scissor(a, b, c, d int)


Tags:

Applies to: None


set_color(str string, c gx.Color)


Tags:

Applies to: Shader


set_ebo(ebo u32, indices []int, draw_typ int)


Tags:

Applies to: None


set_int(str string, n int)


Tags:

Applies to: Shader


set_mat4(str string, m glm.Mat4)


Tags:

Applies to: Shader


set_vbo(vbo u32, vertices []f32, draw_typ int)


Tags:

Applies to: None


shader_compile_status(shader int) int


Tags:

Applies to: None


shader_info_log(shader int) string


Tags:

Applies to: None


shader_source(shader, a int, source string, b int)


Tags:

Applies to: None


str() string


Tags:

Applies to: Shader


tex_param(key, val int)


Tags:

Applies to: None


uni_location(key string) int


Tags:

Applies to: Shader


use_program(program int)


Tags:

Applies to: None


use()


Tags:

Applies to: Shader


vertex_attrib_pointer(index, size int, typ int, normalized bool, _stride int, _ptr int)


Tags:

Applies to: None


viewport(a, b, c, d int)


Tags:

Applies to: None

glfw


mouse_move(w * GLFWwindow, x, y double)


Tags:

Applies to: None


type clickpub fn pub fn (window * GLFWwindow, button, action, mods int)


Tags:

Applies to: None


C.glfwGetVideoMode() &C.GLFWvidmode


Tags:

Applies to: None


create_window(c WinCfg) &Window


Tags:

Applies to: None


destroy()


Tags:

Applies to: &Window


get_clipboard_text() string


Tags:

Applies to: &Window


get_cursor_pos() Pos


Tags:

Applies to: &Window


get_cursor_pos(cwindow voidptr) (f64, f64)


Tags:

Applies to: None


get_framebuffer_size() Size

get framebuffer size in pixels

Tags:

Applies to: &Window


get_monitor_size() Size


Tags:

Applies to: None


get_time() f64


Tags:

Applies to: None


get_window_size() Size

get window size in screen coordinates

Tags:

Applies to: &Window


get_window_user_pointer(gwnd voidptr) voidptr


Tags:

Applies to: None


init_glfw()


Tags:

Applies to: None


key_pressed(wnd voidptr, key int) bool


Tags:

Applies to: None


make_context_current()


Tags:

Applies to: &Window


mouse_move(w voidptr, x, y f64)


Tags:

Applies to: None


on_click(cb voidptr)


Tags:

Applies to: Window


on_resize(cb voidptr)


Tags:

Applies to: Window


on_scroll(cb voidptr)


Tags:

Applies to: &Window


onchar(cb voidptr)


Tags:

Applies to: Window


onkeydown(cb voidptr)


Tags:

Applies to: Window


onmousemove(cb voidptr)


Tags:

Applies to: Window


poll_events()


Tags:

Applies to: None


post_empty_event()


Tags:

Applies to: None


scale() f32


Tags:

Applies to: &Window


set_clipboard_text(s string)


Tags:

Applies to: &Window


set_cursor(c Cursor)


Tags:

Applies to: &Window,None


set_mouse_button_callback(cb voidptr)


Tags:

Applies to: Window


set_scroll_callback(cb voidptr)


Tags:

Applies to: &Window


set_should_close(close bool)


Tags:

Applies to: &Window


set_should_close(w voidptr, close bool)


Tags:

Applies to: None


set_title(title string)


Tags:

Applies to: &Window


set_user_ptr(ptr voidptr)


Tags:

Applies to: &Window


should_close() bool


Tags:

Applies to: &Window


str() string


Tags:

Applies to: Size


swap_buffers()


Tags:

Applies to: &Window


swap_interval(interval int)


Tags:

Applies to: None


terminate()


Tags:

Applies to: None


user_ptr() voidptr


Tags:

Applies to: &Window


wait_events()


Tags:

Applies to: None


window_hint(key, val int)


Tags:

Applies to: None

glm


identity() Mat4


Tags:

Applies to: None


identity2(res mut &f32)

returns *f32 without allocation

Tags:

Applies to: None


identity3() []f32


Tags:

Applies to: None


ortho(left, right, bottom, top f32) Mat4

https://github.com/g-truc/glm/blob/0ceb2b755fb155d593854aefe3e45d416ce153a4/glm/ext/matrix_clip_space.inl

Tags:

Applies to: None


rotate_z(m Mat4, rad f32) Mat4


Tags:

Applies to: None


scale(m Mat4, v Vec3) Mat4


Tags:

Applies to: None


str() string


Tags:

Applies to: Mat4,Vec2,Vec3


translate(m Mat4, v Vec3) Mat4


Tags:

Applies to: None


vec3(x, y, z f32) Vec3


Tags:

Applies to: None

gx


eq(b Color) bool


Tags:

Applies to: Color


hex(color int) Color


Tags:

Applies to: None


is_empty() bool


Tags:

Applies to: Image


rgb(r, g, b int) Color


Tags:

Applies to: None


str() string


Tags:

Applies to: Color

hash.crc32


checksum(b []byte) u32


Tags:

Applies to: &Crc32


new(poly int) &Crc32

pass the polinomial to use

Tags:

Applies to: None


sum(b []byte) u32

calculate crc32 using ieee

Tags:

Applies to: None

hash.fnv1a


sum32_string(data string) u32


Tags:

Applies to: None


sum32(data []byte) u32


Tags:

Applies to: None


sum64_string(data string) u64


Tags:

Applies to: None


sum64(data []byte) u64


Tags:

Applies to: None

hash.wyhash


rand_u64(seed &u64) u64


Tags:

Applies to: None


sum64_string(key string, seed u64) u64


Tags:

Applies to: None


sum64(key []byte, seed u64) u64


Tags:

Applies to: None


wyhash_c(key byteptr, len, seed u64) u64


Tags:

Applies to: None

json


decode() ?voidptr


Tags:

Applies to: None


encode(x voidptr) string


Tags:

Applies to: None


json_array_for_each(val, root &C.cJSON)

cjson wrappers

Tags:

Applies to: None

log


close()


Tags:

Applies to: Log


debug(s string)


Tags:

Applies to: Log


error(s string)


Tags:

Applies to: Log


fatal(s string)


Tags:

Applies to: Log


info(s string)


Tags:

Applies to: Log


set_full_logpath(full_log_path string)


Tags:

Applies to: Log


set_level(level Level)


Tags:

Applies to: Log


set_output_label(label string)


Tags:

Applies to: Log


set_output_level(level Level)


Tags:

Applies to: Log


set_output_path(output_file_path string)


Tags:

Applies to: Log


warn(s string)


Tags:

Applies to: Log

math


abs(a f64) f64

returns the absolute value.

Tags:

Applies to: None


acos(a f64) f64

calculates inverse cosine (arccosine).

Tags:

Applies to: None


aprox_cos(a f64) f64

Faster approximate cos() implemented from lolremez

Tags:

Applies to: None


aprox_sin(a f64) f64

Faster approximate sin() implemented from lolremez

Tags:

Applies to: None


asin(a f64) f64

calculates inverse sine (arcsine).

Tags:

Applies to: None


atan(a f64) f64

calculates inverse tangent (arctangent).

Tags:

Applies to: None


atan2(a, b f64) f64

calculates inverse tangent with two arguments, returns the angle between the X axis and the point.

Tags:

Applies to: None


cbrt(a f64) f64

calculates cubic root.

Tags:

Applies to: None


ceil(a f64) f64

returns the nearest f64 greater or equal to the provided value.

Tags:

Applies to: None


copysign(x, y f64) f64

returns a value with the magnitude of x and the sign of y

Tags:

Applies to: None


cos(a f64) f64

calculates cosine.

Tags:

Applies to: None


cosf(a f32) f32

calculates cosine. (float32)

Tags:

Applies to: None


cosh(a f64) f64

calculates hyperbolic cosine.

Tags:

Applies to: None


degrees(radians f64) f64

convert from degrees to radians.

Tags:

Applies to: None


digits(_n, base int) []int

returns an array of the digits of n in the given base.

Tags:

Applies to: None


erf(a f64) f64

computes the error function value

Tags:

Applies to: None


erfc(a f64) f64

computes the complementary error function value

Tags:

Applies to: None


exp(a f64) f64

calculates exponent of the number (math.pow(math.E, a)).

Tags:

Applies to: None


exp2(a f64) f64

returns the base-2 exponential function of a (math.pow(2, a)).

Tags:

Applies to: None


f32_bits(f f32) u32

returns the IEEE 754 binary representation of f,
with the sign bit of f and the result in the same bit position.
f32_bits(f32_from_bits(x)) == x.

Tags:

Applies to: None


f32_from_bits(b u32) f32

returns the floating-point number corresponding
to the IEEE 754 binary representation b, with the sign bit of b
and the result in the same bit position.
f32_from_bits(f32_bits(x)) == x.

Tags:

Applies to: None


f64_bits(f f64) u64

returns the IEEE 754 binary representation of f,
with the sign bit of f and the result in the same bit position,
and f64_bits(f64_from_bits(x)) == x.

Tags:

Applies to: None


f64_from_bits(b u64) f64

returns the floating-point number corresponding
to the IEEE 754 binary representation b, with the sign bit of b
and the result in the same bit position.
f64_from_bits(f64_bits(x)) == x.

Tags:

Applies to: None


floor(a f64) f64

returns the nearest f64 lower or equal of the provided value.

Tags:

Applies to: None


fmod(a, b f64) f64

returns the floating-point remainder of number / denom (rounded towards zero)

Tags:

Applies to: None


gamma(a f64) f64

computes the gamma function value

Tags:

Applies to: None


gcd(a_, b_ i64) i64

calculates greatest common (positive) divisor (or zero if a and b are both zero).

Tags:

Applies to: None


hypot(a, b f64) f64

returns hypotenuse of a right triangle.

Tags:

Applies to: None


inf(sign int) f64

returns positive infinity if sign >= 0, negative infinity if sign < 0.

Tags:

Applies to: None


is_inf(f f64, sign int) bool

is_inf reports whether f is an infinity, according to sign.
If sign > 0, is_inf reports whether f is positive infinity.
If sign < 0, is_inf reports whether f is negative infinity.
If sign == 0, is_inf reports whether f is either infinity.

Tags:

Applies to: None


is_nan(f f64) bool

reports whether f is an IEEE 754 ``not-a-number'' value.

Tags:

Applies to: None


lcm(a, b i64) i64

calculates least common (non-negative) multiple.

Tags:

Applies to: None


log_gamma(a f64) f64

computes the log-gamma function value

Tags:

Applies to: None


log_n(a, b f64) f64

calculates base-N logarithm of the provided value.

Tags:

Applies to: None


log(a f64) f64

calculates natural (base-e) logarithm of the provided value.

Tags:

Applies to: None


log10(a f64) f64

calculates the common (base-10) logarithm of the provided value.

Tags:

Applies to: None


log2(a f64) f64

calculates base-2 logarithm of the provided value.

Tags:

Applies to: None


max(a, b f64) f64

returns the maximum value of the two provided.

Tags:

Applies to: None


min(a, b f64) f64

returns the minimum value of the two provided.

Tags:

Applies to: None


nan() f64

returns an IEEE 754 ``not-a-number'' value.

Tags:

Applies to: None


normalize(x f64) (f64, int)

NOTE: (joe-c) exponent notation is borked
normalize returns a normal number y and exponent exp
satisfying x == y 2**exp. It assumes x is finite and non-zero.

Tags:

Applies to: None


pow(a, b f64) f64

returns base raised to the provided power.

Tags:

Applies to: None


powf(a, b f32) f32

returns base raised to the provided power. (float32)

Tags:

Applies to: None


radians(degrees f64) f64

convert from radians to degrees.

Tags:

Applies to: None


round(f f64) f64

returns the integer nearest to the provided value.

Tags:

Applies to: None


sin(a f64) f64

calculates sine.

Tags:

Applies to: None


sinf(a f32) f32

calculates sine. (float32)

Tags:

Applies to: None


sinh(a f64) f64

calculates hyperbolic sine.

Tags:

Applies to: None


sqrt(a f64) f64

calculates square-root of the provided value.

Tags:

Applies to: None


sqrtf(a f32) f32

calculates square-root of the provided value. (float32)

Tags:

Applies to: None


tan(a f64) f64

calculates tangent.

Tags:

Applies to: None


tanf(a f32) f32

calculates tangent. (float32)

Tags:

Applies to: None


tanh(a f64) f64

calculates hyperbolic tangent.

Tags:

Applies to: None


trunc(a f64) f64

rounds a toward zero, returning the nearest integral value that is not larger in magnitude than a.

Tags:

Applies to: None

math.big


- (b Number) Number


Tags:

Applies to: Number


* (b Number) Number


Tags:

Applies to: Number


/ (b Number) Number


Tags:

Applies to: Number


% (b Number) Number


Tags:

Applies to: Number


+ (b Number) Number


Tags:

Applies to: Number


b_and(a Number, b Number) Number


Tags:

Applies to: None


b_or(a Number, b Number) Number


Tags:

Applies to: None


b_xor(a Number, b Number) Number


Tags:

Applies to: None


clone() Number


Tags:

Applies to: Number


cmp(a Number, b Number) int


Tags:

Applies to: None


dec()


Tags:

Applies to: Number


divmod( a &Number, b &Number, c &Number) Number


Tags:

Applies to: None


fact(n int) Number


Tags:

Applies to: None


factorial(nn Number) Number


Tags:

Applies to: None


from_int(i int) Number


Tags:

Applies to: None


from_string(s string) Number


Tags:

Applies to: None


from_u64(u u64) Number


Tags:

Applies to: None


hexstr() string


Tags:

Applies to: Number


inc()


Tags:

Applies to: Number


int() int


Tags:

Applies to: Number


is_zero() bool


Tags:

Applies to: Number


isqrt() Number


Tags:

Applies to: Number


lshift(nbits int) Number


Tags:

Applies to: Number


new() Number


Tags:

Applies to: None


pow(a Number, b Number) Number


Tags:

Applies to: None


rshift(nbits int) Number


Tags:

Applies to: Number


str() string


Tags:

Applies to: Number

math.bits


add_32(x u32, y u32, carry u32) (u32, u32)

returns the sum with carry of x, y and carry: sum = x + y + carry.
The carry input must be 0 or 1; otherwise the behavior is undefined.
The carryOut output is guaranteed to be 0 or 1.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


add_64(x u64, y u64, carry u64) (u64, u64)

returns the sum with carry of x, y and carry: sum = x + y + carry.
The carry input must be 0 or 1; otherwise the behavior is undefined.
The carryOut output is guaranteed to be 0 or 1.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


div_32(hi u32, lo u32, y u32) (u32, u32)

returns the quotient and remainder of (hi, lo) divided by y:
quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper
half in parameter hi and the lower half in parameter lo.
div_32 panics for y == 0 (division by zero) or y <= hi (quotient overflow).

Tags: bits

Applies to: None


div_64(hi u64, lo u64, y1 u64) (u64, u64)

returns the quotient and remainder of (hi, lo) divided by y:
quo = (hi, lo)/y, rem = (hi, lo)%y with the dividend bits' upper
half in parameter hi and the lower half in parameter lo.
div_64 panics for y == 0 (division by zero) or y <= hi (quotient overflow).

Tags: bits

Applies to: None


leading_zeros_16(x u16) int

returns the number of leading zero bits in x; the result is 16 for x == 0.

Tags: bits

Applies to: None


leading_zeros_32(x u32) int

returns the number of leading zero bits in x; the result is 32 for x == 0.

Tags: bits

Applies to: None


leading_zeros_64(x u64) int

returns the number of leading zero bits in x; the result is 64 for x == 0.

Tags: bits

Applies to: None


leading_zeros_8(x byte) int

returns the number of leading zero bits in x; the result is 8 for x == 0.

Tags: bits

Applies to: None


len_16(x u16) int

returns the minimum number of bits required to represent x; the result is 0 for x == 0.

Tags: bits

Applies to: None


len_32(x u32) int

returns the minimum number of bits required to represent x; the result is 0 for x == 0.

Tags: bits

Applies to: None


len_64(x u64) int

returns the minimum number of bits required to represent x; the result is 0 for x == 0.

Tags: bits

Applies to: None


len_8(x byte) int

returns the minimum number of bits required to represent x; the result is 0 for x == 0.

Tags: bits

Applies to: None


mul_32(x u32, y u32) (u32, u32)

returns the 64-bit product of x and y: (hi, lo) = x * y
with the product bits' upper half returned in hi and the lower
half returned in lo.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


mul_64(x u64, y u64) (u64, u64)

returns the 128-bit product of x and y: (hi, lo) = x * y
with the product bits' upper half returned in hi and the lower
half returned in lo.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


ones_count_16(x u16) int

returns the number of one bits ("population count") in x.

Tags: bits

Applies to: None


ones_count_32(x u32) int

returns the number of one bits ("population count") in x.

Tags: bits

Applies to: None


ones_count_64(x u64) int

returns the number of one bits ("population count") in x.

Tags: bits

Applies to: None


ones_count_8(x byte) int

returns the number of one bits ("population count") in x.

Tags: bits

Applies to: None


rem_32(hi u32, lo u32, y u32) u32

returns the remainder of (hi, lo) divided by y. Rem32 panics
for y == 0 (division by zero) but, unlike Div32, it doesn't panic
on a quotient overflow.

Tags: bits

Applies to: None


rem_64(hi, lo, y u64) u64

returns the remainder of (hi, lo) divided by y. Rem64 panics
for y == 0 (division by zero) but, unlike div_64, it doesn't panic
on a quotient overflow.

Tags: bits

Applies to: None


reverse_16(x u16) u16

returns the value of x with its bits in reversed order.

Tags: bits

Applies to: None


reverse_32(x u32) u32

returns the value of x with its bits in reversed order.

Tags: bits

Applies to: None


reverse_64(x u64) u64

returns the value of x with its bits in reversed order.

Tags: bits

Applies to: None


reverse_8(x byte) byte

returns the value of x with its bits in reversed order.

Tags: bits

Applies to: None


reverse_bytes_16(x u16) u16

returns the value of x with its bytes in reversed order.
his function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


reverse_bytes_32(x u32) u32

returns the value of x with its bytes in reversed order.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


reverse_bytes_64(x u64) u64

returns the value of x with its bytes in reversed order.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


rotate_left_16(x u16, k int) u16

returns the value of x rotated left by (k mod 16) bits.
To rotate x right by k bits, call rotate_left_16(x, -k).
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


rotate_left_32(x u32, k int) u32

returns the value of x rotated left by (k mod 32) bits.
To rotate x right by k bits, call rotate_left_32(x, -k).
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


rotate_left_64(x u64, k int) u64

returns the value of x rotated left by (k mod 64) bits.
To rotate x right by k bits, call rotate_left_64(x, -k).
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


rotate_left_8(x byte, k int) byte

returns the value of x rotated left by (k mod 8) bits.
To rotate x right by k bits, call rotate_left_8(x, -k).
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


sub_32(x u32, y u32, borrow u32) (u32, u32)

returns the difference of x, y and borrow, diff = x - y - borrow.
The borrow input must be 0 or 1; otherwise the behavior is undefined.
The borrowOut output is guaranteed to be 0 or 1.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


sub_64(x u64, y u64, borrow u64) (u64, u64)

returns the difference of x, y and borrow: diff = x - y - borrow.
The borrow input must be 0 or 1; otherwise the behavior is undefined.
The borrowOut output is guaranteed to be 0 or 1.
This function's execution time does not depend on the inputs.

Tags: bits

Applies to: None


trailing_zeros_16(x u16) int

returns the number of trailing zero bits in x; the result is 16 for x == 0.

Tags: bits

Applies to: None


trailing_zeros_32(x u32) int

returns the number of trailing zero bits in x; the result is 32 for x == 0.

Tags: bits

Applies to: None


trailing_zeros_64(x u64) int

returns the number of trailing zero bits in x; the result is 64 for x == 0.

Tags: bits

Applies to: None


trailing_zeros_8(x byte) int

returns the number of trailing zero bits in x; the result is 8 for x == 0.

Tags: bits

Applies to: None

math.complex


- (c2 Complex) Complex

Complex Substraction c1 - c2

Tags: math, complex

Applies to: Complex


* (c2 Complex) Complex

Complex Multiplication c1 * c2

Tags: math, complex

Applies to: Complex


/ (c2 Complex) Complex

Complex Division c1 / c2

Tags: math, complex

Applies to: Complex


asech() Complex

Complex Hyperbolic Arc Secant / Secant Inverse
Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm
For certain scenarios, Result mismatch in crossverification with Wolfram Alpha - analysis pending

Tags: math, complex

Applies to: Complex


+ (c2 Complex) Complex

Complex Addition c1 + c2

Tags: math, complex

Applies to: Complex


abs() f64

Complex Modulus value
Mod() and abs() return the same

Tags: math, complex

Applies to: Complex


acos() Complex

Complex Arc Consine / Consine Inverse
Based on http://www.milefoot.com/math/complex/summaryops.htm

Tags: math, complex

Applies to: Complex


acosh() Complex

Complex Hyperbolic Arc Consine / Consine Inverse
Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


acot() Complex

Complex Arc Cotangent / Cotangent Inverse
Based on http://www.suitcaseofdreams.net/Inverse_Functions.htm

Tags: math, complex

Applies to: Complex


acoth() Complex

Complex Hyperbolic Arc Cotangent / Cotangent Inverse
Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


acsc() Complex

Complex Arc Cosecant / Cosecant Inverse
Based on http://www.suitcaseofdreams.net/Inverse_Functions.htm

Tags: math, complex

Applies to: Complex


acsch() Complex

Complex Hyperbolic Arc Cosecant / Cosecant Inverse
Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


add(c2 Complex) Complex

Complex Addition c1.add(c2)

Tags: math, complex

Applies to: Complex


addinv() Complex

Complex Additive Inverse
Based on http://tutorial.math.lamar.edu/Extras/ComplexPrimer/Arithmetic.aspx

Tags: math, complex

Applies to: Complex


angle() f64

Complex Angle

Tags: math, complex

Applies to: Complex


arg() f64

Complex Argument
Based on http://mathworld.wolfram.com/ComplexArgument.html

Tags: math, complex

Applies to: Complex


asec() Complex

Complex Arc Secant / Secant Inverse
Based on http://www.suitcaseofdreams.net/Inverse_Functions.htm

Tags: math, complex

Applies to: Complex


asin() Complex

Complex Arc Sin / Sin Inverse
Based on http://www.milefoot.com/math/complex/summaryops.htm

Tags: math, complex

Applies to: Complex


asinh() Complex

Complex Hyperbolic Arc Sin / Sin Inverse
Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


atan() Complex

Complex Arc Tangent / Tangent Inverse
Based on http://www.milefoot.com/math/complex/summaryops.htm

Tags: math, complex

Applies to: Complex


atanh() Complex

Complex Hyperbolic Arc Tangent / Tangent Inverse
Based on http://www.suitcaseofdreams.net/Inverse__Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


complex(re f64, im f64) Complex


Tags: math, complex

Applies to: None


conjugate() Complex

Complex Conjugate

Tags: math, complex

Applies to: Complex


cos() Complex

Complex Cosine
Based on http://www.milefoot.com/math/complex/functionsofi.htm

Tags: math, complex

Applies to: Complex


cosh() Complex

Complex Hyperbolic Cosine
Based on http://www.milefoot.com/math/complex/functionsofi.htm

Tags: math, complex

Applies to: Complex


cot() Complex

Complex Cotangent
Based on http://www.suitcaseofdreams.net/Trigonometric_Functions.htm

Tags: math, complex

Applies to: Complex


coth() Complex

Complex Hyperbolic Cotangent
Based on http://www.suitcaseofdreams.net/Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


cpow(p Complex) Complex

Complex raised to Complex Power
Based on http://mathworld.wolfram.com/ComplexExponentiation.html

Tags: math, complex

Applies to: Complex


csc() Complex

Complex Cosecant
Based on http://www.suitcaseofdreams.net/Trigonometric_Functions.htm

Tags: math, complex

Applies to: Complex


csch() Complex

Complex Hyperbolic Cosecant
Based on http://www.suitcaseofdreams.net/Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


divide(c2 Complex) Complex

Complex Division c1.divide(c2)

Tags: math, complex

Applies to: Complex


equals(c2 Complex) bool

Complex Equals

Tags: math, complex

Applies to: Complex


exp() Complex

Complex Exponential
Using Euler's Identity
Based on https://www.math.wisc.edu/~angenent/Free-Lecture-Notes/freecomplexnumbers.pdf

Tags: math, complex

Applies to: Complex


ln() Complex

Complex Natural Logarithm
Based on http://www.chemistrylearning.com/logarithm-of-complex-number/

Tags: math, complex

Applies to: Complex


log(base Complex) Complex

Complex Log Base Complex
Based on http://www.milefoot.com/math/complex/summaryops.htm

Tags: math, complex

Applies to: Complex


mod() f64

Complex Modulus value
mod() and abs() return the same

Tags: math, complex

Applies to: Complex


mulinv() Complex

Complex Multiplicative Inverse
Based on http://tutorial.math.lamar.edu/Extras/ComplexPrimer/Arithmetic.aspx

Tags: math, complex

Applies to: Complex


multiply(c2 Complex) Complex

Complex Multiplication c1.multiply(c2)

Tags: math, complex

Applies to: Complex


pow(n f64) Complex

Complex Power
Based on https://www.khanacademy.org/math/precalculus/imaginary-and-complex-numbers/multiplying-and-dividing-complex-numbers-in-polar-form/a/complex-number-polar-form-review

Tags: math, complex

Applies to: Complex


root(n f64) Complex

Complex nth root

Tags: math, complex

Applies to: Complex


sec() Complex

Complex Secant
Based on http://www.suitcaseofdreams.net/Trigonometric_Functions.htm

Tags: math, complex

Applies to: Complex


sech() Complex

Complex Hyperbolic Secant
Based on http://www.suitcaseofdreams.net/Hyperbolic_Functions.htm

Tags: math, complex

Applies to: Complex


sin() Complex

Complex Sin
Based on http://www.milefoot.com/math/complex/functionsofi.htm

Tags: math, complex

Applies to: Complex


sinh() Complex

Complex Hyperbolic Sin
Based on http://www.milefoot.com/math/complex/functionsofi.htm

Tags: math, complex

Applies to: Complex


str() string

To String method

Tags: math, complex

Applies to: Complex


subtract(c2 Complex) Complex

Complex Subtraction c1.subtract(c2)

Tags: math, complex

Applies to: Complex


tan() Complex

Complex Tangent
Based on http://www.milefoot.com/math/complex/functionsofi.htm

Tags: math, complex

Applies to: Complex


tanh() Complex

Complex Hyperbolic Tangent
Based on http://www.milefoot.com/math/complex/functionsofi.htm

Tags: math, complex

Applies to: Complex

math.factorial


factorial(n f64) f64

calculates the factorial of the provided value.

Tags: math, factorial

Applies to: None


log_factorial(n f64) f64

calculates the log-factorial of the provided value.

Tags: math, factorial

Applies to: None

math.fractions


- (f2 Fraction) Fraction

Fraction subtract using operator overloading

Tags: math, fraction

Applies to: Fraction


* (f2 Fraction) Fraction

Fraction multiply using operator overloading

Tags: math, fraction

Applies to: Fraction


/ (f2 Fraction) Fraction

Fraction divide using operator overloading

Tags: math, fraction

Applies to: Fraction


+ (f2 Fraction) Fraction

Fraction add using operator overloading

Tags: math, fraction

Applies to: Fraction


add(f2 Fraction) Fraction

Fraction add method

Tags: math, fraction

Applies to: Fraction


divide(f2 Fraction) Fraction

Fraction divide method

Tags: math, fraction

Applies to: Fraction


equals(f2 Fraction) bool

Compares two Fractions

Tags: math, fraction

Applies to: Fraction


f64() f64

Converts Fraction to decimal

Tags: math, fraction

Applies to: Fraction


fraction(n i64, d i64) Fraction

A factory function for creating a Fraction, adds a boundary condition

Tags: math, fraction

Applies to: None


gcd() i64

Fraction method which gives greatest common divisor of numerator and denominator

Tags: math, fraction

Applies to: Fraction


multiply(f2 Fraction) Fraction

Fraction multiply method

Tags: math, fraction

Applies to: Fraction


reciprocal() Fraction

Fraction reciprocal method

Tags: math, fraction

Applies to: Fraction


reduce() Fraction

Fraction method which reduces the fraction

Tags: math, fraction

Applies to: Fraction


str() string

To String method

Tags: math, fraction

Applies to: Fraction


subtract(f2 Fraction) Fraction

Fraction subtract method

Tags: math, fraction

Applies to: Fraction

math.stats


freq(arr []f64, val f64) int

Measure of Occurance
Frequency of a given number
Based on https://www.mathsisfun.com/data/frequency-distribution.html

Tags: stats

Applies to: None


geometric_mean(arr []f64) f64

Measure of Central Tendancy
Geometric Mean of the given input array
Based on https://www.mathsisfun.com/numbers/geometric-mean.html

Tags: stats

Applies to: None


harmonic_mean(arr []f64) f64

Measure of Central Tendancy
Harmonic Mean of the given input array
Based on https://www.mathsisfun.com/numbers/harmonic-mean.html

Tags: stats

Applies to: None


max(arr []f64) f64

Maximum of the given input array

Tags: stats

Applies to: None


mean_absdev(arr []f64) f64

Measure of Dispersion / Spread
Mean Absolute Deviation of the given input array
Based on https://en.wikipedia.org/wiki/Average_absolute_deviation

Tags: stats

Applies to: None


mean(arr []f64) f64

Measure of Central Tendancy
Mean of the given input array
Based on https://www.mathsisfun.com/data/central-measures.html

Tags: stats

Applies to: None


median(arr []f64) f64

Measure of Central Tendancy
Median of the given input array ( input array is assumed to be sorted )
Based on https://www.mathsisfun.com/data/central-measures.html

Tags: stats

Applies to: None


min(arr []f64) f64

Minimum of the given input array

Tags: stats

Applies to: None


mode(arr []f64) f64

Measure of Central Tendancy
Mode of the given input array
Based on https://www.mathsisfun.com/data/central-measures.html

Tags: stats

Applies to: None


population_stddev(arr []f64) f64

Measure of Dispersion / Spread
Population Standard Deviation of the given input array
Based on https://www.mathsisfun.com/data/standard-deviation.html

Tags: stats

Applies to: None


population_variance(arr []f64) f64

Measure of Dispersion / Spread
Population Variance of the given input array
Based on https://www.mathsisfun.com/data/standard-deviation.html

Tags: stats

Applies to: None


range(arr []f64) f64

Measure of Dispersion / Spread
Range ( Maximum - Minimum ) of the given input array
Based on https://www.mathsisfun.com/data/range.html

Tags: stats

Applies to: None


rms(arr []f64) f64

Root Mean Square of the given input array
Based on https://en.wikipedia.org/wiki/Root_mean_square

Tags: stats

Applies to: None


sample_stddev(arr []f64) f64

Measure of Dispersion / Spread
Sample Standard Deviation of the given input array
Based on https://www.mathsisfun.com/data/standard-deviation.html

Tags: stats

Applies to: None


sample_variance(arr []f64) f64

Measure of Dispersion / Spread
Sample Variance of the given input array
Based on https://www.mathsisfun.com/data/standard-deviation.html

Tags: stats

Applies to: None

mysql


affected_rows() u64


Tags:

Applies to: Connection


autocommit(mode bool)


Tags:

Applies to: Connection


change_user(username, password, dbname string) ?bool


Tags:

Applies to: Connection


close()


Tags:

Applies to: Connection


connect() ?bool


Tags:

Applies to: Connection


debug(debug string)


Tags:

Applies to: None


dump_debug_info() ?bool


Tags:

Applies to: Connection


escape_string(s string) string


Tags:

Applies to: Connection


fetch_fields() []Field


Tags:

Applies to: Result


fetch_row() &byteptr


Tags:

Applies to: Result


free()


Tags:

Applies to: Result


get_client_info() string


Tags:

Applies to: None


get_client_version() u64


Tags:

Applies to: None


get_host_info() string


Tags:

Applies to: Connection


get_option(option_type int) ?voidptr


Tags:

Applies to: Connection


get_server_info() string


Tags:

Applies to: Connection


get_server_version() u64


Tags:

Applies to: Connection


info() string


Tags:

Applies to: Connection


new_connection(host, username, password, dbname string) ?Connection


Tags:

Applies to: None


num_fields() int


Tags:

Applies to: Result


ping() ?bool


Tags:

Applies to: Connection


query(q string) ?Result


Tags:

Applies to: Connection


refresh(options u32) ?bool


Tags:

Applies to: Connection


reset_connection() ?bool


Tags:

Applies to: Connection


rows() []Row


Tags:

Applies to: Result


select_db(dbname string) ?bool


Tags:

Applies to: Connection


set_option(option_type int, val voidptr)


Tags:

Applies to: Connection


str() string


Tags:

Applies to: Field,FieldType

net


accept() ?Socket

accept first connection request from socket queue

Tags:

Applies to: Socket


bind(port int) ?int

bind socket to port

Tags:

Applies to: Socket


close() ?int

shutdown and close socket

Tags:

Applies to: Socket


connect(address string, port int) ?int

connect to given addrress and port

Tags:

Applies to: Socket


cread(buffer byteptr, buffersize int) int


Tags:

Applies to: Socket


crecv(buffer byteptr, buffersize int) int

Receive a message from the socket, and place it in a preallocated buffer buf,
with maximum message size bufsize. Returns the length of the received message.

Tags:

Applies to: Socket


dial(address string, port int) ?Socket

helper method to create socket and connect

Tags:

Applies to: None


get_port() int


Tags:

Applies to: Socket


hostname() ?string

returns the host name reported by the kernel.

Tags:

Applies to: None


listen_backlog(backlog int) ?int

put socket into passive mode with user specified backlog and wait to receive

Tags:

Applies to: Socket


listen() ?int

put socket into passive mode and wait to receive

Tags:

Applies to: Socket


listen(port int) ?Socket

helper method to create, bind, and listen given port number

Tags:

Applies to: None


new_socket(family int, _type int, proto int) ?Socket

create socket

Tags:

Applies to: None


read_all() string


Tags:

Applies to: Socket


read_line() string

retrieves a line from the socket s (i.e. a string ended with \n)

Tags:

Applies to: Socket


recv(bufsize int) (byteptr,int)

receive string data from socket. NB: you are responsible for freeing the returned byteptr

Tags:

Applies to: Socket


send_string(sdata string) ?int

send string data to socket (when you have a v string)

Tags:

Applies to: Socket


send(buf byteptr, len int) ?int

send data to socket (when you have a memory buffer)

Tags:

Applies to: Socket


setsockopt(level int, optname int, optvalue &int) ?int

set socket options

Tags:

Applies to: Socket


socket_udp() ?Socket


Tags:

Applies to: None


write(str string) ?int

write a string with CRLF after it over the socket s

Tags:

Applies to: Socket

net.ftp


cd(dir string)


Tags:

Applies to: FTP


close()


Tags:

Applies to: FTP


connect(ip string) bool


Tags:

Applies to: FTP


dir() ?[]string


Tags:

Applies to: FTP


get(file string) ?[]byte


Tags:

Applies to: FTP


login(user, passwd string) bool


Tags:

Applies to: FTP


new() FTP


Tags:

Applies to: None


pwd() string


Tags:

Applies to: FTP

net.http


add_header(key, val string)

adds the key and value of an HTTP request header

Tags: net, http

Applies to: Request


delete(url string) ?Response


Tags: net, http

Applies to: None


do() ?Response

sends the HTTP request and returns `http.Response` as soon as the response is recieved

Tags: net, http

Applies to: &Request


download_file_with_progress(url, out string, cb downloadfn, cb_finished fn())


Tags: net, http

Applies to: None


download_file(url, out string)


Tags: net, http, download

Applies to: None


download_file(url, out string) bool


Tags: net, http, download

Applies to: None


escape_url(s string) string


Tags: net, http

Applies to: None


escape(s string) string


Tags: net, http

Applies to: None


fetch(_url string, config FetchConfig) ?Response


Tags: net, http

Applies to: None


get_text(url string) string


Tags: net, http

Applies to: None


get(url string) ?Response


Tags: net, http

Applies to: None


head(url string) ?Response


Tags: net, http

Applies to: None


is_cookie_domain_name(_s string) bool


Tags: net, http, cookie

Applies to: None


parse_headers(lines []string) map[string]string


Tags: net, http

Applies to: None


patch(url, data string) ?Response


Tags: net, http

Applies to: None


post_form(url string, data map[string]string) ?Response


Tags: net, http

Applies to: None


post(url, data string) ?Response


Tags: net, http

Applies to: None


put(url, data string) ?Response


Tags: net, http

Applies to: None


read_cookies(h map[string][]string, filter string) []&Cookie

Parses all "Cookie" values from the header `h` and
returns the successfully parsed Cookies.

if `filter` isn't empty, only cookies of that name are returned

Tags: net, http, cookie

Applies to: None


read_set_cookies(h map[string][]string) []&Cookie

Parses all "Set-Cookie" values from the header `h` and
returns the successfully parsed Cookies.

Tags: net, http, cookie

Applies to: None


sanitize_cookie_value(v string) string

https://tools.ietf.org/html/rfc6265#section-4.1.1
cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
          ; US-ASCII characters excluding CTLs,
          ; whitespace DQUOTE, comma, semicolon,
          ; and backslash
We loosen this as spaces and commas are common in cookie values
but we produce a quoted cookie-value in when value starts or ends
with a comma or space.

Tags: net, http, cookie

Applies to: None


str() string

Returns the serialization of the cookie for use in a Cookie header
(if only Name and Value are set) or a Set-Cookie response
header (if other fields are set).

If c.name is invalid, the empty string is returned.

Tags: net, http, cookie

Applies to: &Cookie


unescape_url(s string) string


Tags: net, http

Applies to: None


unescape(s string) string


Tags: net, http

Applies to: None


url_encode_form_data(data map[string]string) string


Tags: net, http

Applies to: None

net.http.chunked


decode(text string) string


Tags: net, http, chunk

Applies to: None

net.urllib


add(key, value string)

add adds the value to key. It appends to any existing
values associated with key.

Tags:

Applies to: Values


all() []string

Currently you will need to use all()[key].data
once map[string][]string is implemented
this will be fixed

Tags:

Applies to: &Value


del(key string)

deletes the values associated with key.

Tags:

Applies to: Values


encode() string

encodes the values into ``URL encoded'' form
('bar=baz&foo=quux') sorted by key.

Tags:

Applies to: Values


get_all(key string) []string

gets the all the values associated with the given key.
If there are no values associated with the key, get returns
a empty []string.

Tags:

Applies to: &Values


get(key string) string

gets the first value associated with the given key.
If there are no values associated with the key, get returns
a empty string.

Tags:

Applies to: &Values


hostname() string

returns u.host, stripping any valid port number if present.

If the result is enclosed in square brackets, as literal IPv6 addresses are,
the square brackets are removed from the result.

Tags:

Applies to: &URL


is_abs() bool

reports whether the URL is absolute.
Absolute means that it has a non-empty scheme.

Tags:

Applies to: &URL


ishex(c byte) bool


Tags:

Applies to: None


new_values() Values

returns a new Values struct for creating
urlencoded query string parameters. it can also be to
post form data with application/x-www-form-urlencoded.
values.encode() will return the encoded data

Tags:

Applies to: None


parse_query(query string) ?Values

parses the URL-encoded query string and returns
a map listing the values specified for each key.
parseQuery always returns a non-nil map containing all the
valid query parameters found; err describes the first decoding error
encountered, if any.

Query is expected to be a list of key=value settings separated by
ampersands or semicolons. A setting without an equals sign is
interpreted as a key set to an empty value.

Tags:

Applies to: None


parse(rawurl string) ?URL

parses rawurl into a URL structure.

The rawurl may be relative (a path, without a host) or absolute
(starting with a scheme). Trying to parse a hostname and path
without a scheme is invalid but may not necessarily return an
error, due to parsing ambiguities.

Tags:

Applies to: None


parse(ref string) ?URL

parses a URL in the context of the receiver. The provided URL
may be relative or absolute. parse returns nil, err on parse
failure, otherwise its return value is the same as resolve_reference.

Tags:

Applies to: &URL


path_escape(s string) string

escapes the string so it can be safely placed inside a URL path segment,
replacing special characters (including /) with %XX sequences as needed.

Tags:

Applies to: None


path_unescape(s string) ?string

does the inverse transformation of path_escape,
converting each 3-byte encoded substring of the form '%AB' into the
hex-decoded byte 0xAB. It returns an error if any % is not followed
by two hexadecimal digits.

path_unescape is identical to query_unescape except that it does not
unescape '+' to ' ' (space).

Tags:

Applies to: None


port() string

returns the port part of u.host, without the leading colon.
If u.host doesn't contain a port, port returns an empty string.

Tags:

Applies to: &URL


query_escape(s string) string

escapes the string so it can be safely placed inside a URL query.

Tags:

Applies to: None


query_unescape(s string) ?string

does the inverse transformation of query_escape,
converting each 3-byte encoded substring of the form '%AB' into the
hex-decoded byte 0xAB.
It returns an error if any % is not followed by two hexadecimal
Digits.

Tags:

Applies to: None


query() Values

parses raw_query and returns the corresponding values.
It silently discards malformed value pairs.
To check errors use parseQuery.

Tags:

Applies to: &URL


request_uri() string

returns the encoded path?query or opaque?query
string that would be used in an HTTP request for u.

Tags:

Applies to: &URL


resolve_reference(ref &URL) ?URL

resolves a URI reference to an absolute URI from
an absolute base URI u, per RFC 3986 Section 5.2. The URI reference
may be relative or absolute. resolve_reference always returns a new
URL instance, even if the returned URL is identical to either the
base or reference. If ref is an absolute URL, then resolve_reference
ignores base and returns a copy of ref.

Tags:

Applies to: &URL


set_path(p string) ?bool

sets the path and raw_path fields of the URL based on the provided
escaped path p. It maintains the invariant that raw_path is only specified
when it differs from the default encoding of the path.
For example:
- set_path('/foo/bar')   will set path='/foo/bar' and raw_path=''
- set_path('/foo%2fbar') will set path='/foo/bar' and raw_path='/foo%2fbar'
set_path will return an error only if the provided path contains an invalid
Escaping.

Tags:

Applies to: URL


set(key, value string)

sets the key to value. It replaces any existing values.

Tags:

Applies to: Values


str() string

reassembles the URL into a valid URL string.
The general form of the result is one of:

scheme:opaque?query#fragment
scheme://userinfo@host/path?query#fragment

If u.opaque is non-empty, String uses the first form;
otherwise it uses the second form.
Any non-ASCII characters in host are escaped.
To obtain the path, String uses u.escaped_path().

In the second form, the following rules apply:
- if u.scheme is empty, scheme: is omitted.
- if u.user is nil, userinfo@ is omitted.
- if u.host is empty, host/ is omitted.
- if u.scheme and u.host are empty and u.user is nil,
the entire scheme://userinfo@host/ is omitted.
- if u.host is non-empty and u.path begins with a /,
the form host/path does not add its own /.
- if u.raw_query is empty, ?query is omitted.
- if u.fragment is empty, #fragment is omitted.

Tags:

Applies to: URL


user(username string) &Userinfo

returns a Userinfo containing the provided username and no password set.

Tags:

Applies to: None


valid_userinfo(s string) bool

reports whether s is a valid userinfo string per RFC 3986
Section 3.2.1:
userinfo    = *( unreserved / pct-encoded / sub-delims / ':' )
unreserved  = ALPHA / DIGIT / '-' / '.' / '_' / '~'
sub-delims  = '!' / '$' / '&' / ''' / '(' / ')'
/ '*' / '+' / ',' / ';' / '='

It doesn't validate pct-encoded. The caller does that via fn unescape.

Tags:

Applies to: None

net.websocket


close(code int, message string)


Tags:

Applies to: Client


connect() int


Tags:

Applies to: Client


listen()


Tags:

Applies to: Client


new(uri string) &Client


Tags:

Applies to: None


read() int


Tags:

Applies to: Client


utf8_validate_str(str string) bool


Tags:

Applies to: None


utf8_validate(data byteptr, len int) bool


Tags:

Applies to: None


write(payload byteptr, payload_len int, code OPCode) int


Tags:

Applies to: Client

net.websocket.logger


c(message string)


Tags:

Applies to: &Logger


d(message string)


Tags:

Applies to: &Logger


e(message string)


Tags:

Applies to: &Logger


f(message string)


Tags:

Applies to: &Logger


i(message string)


Tags:

Applies to: &Logger


new(mod string) &Logger


Tags:

Applies to: None


s(message string)


Tags:

Applies to: &Logger


w(message string)


Tags:

Applies to: &Logger

os


base_dir(path string) string


Tags:

Applies to: None


cache_dir() string

returns the path to a *writable* user specific folder, suitable for writing non-essential data.

Tags:

Applies to: None


chdir(path string)

changes the current working directory to the new directory path.

Tags:

Applies to: None


chmod(path string, mode int)


Tags:

Applies to: None


clear()

clears current terminal screen.

Tags:

Applies to: None


close()


Tags:

Applies to: File


cp_all(osource_path, odest_path string, overwrite bool) ?bool


Tags:

Applies to: None


cp_r(osource_path, odest_path string, overwrite bool) ?bool


Tags:

Applies to: None


cp(old, new string) ?bool


Tags:

Applies to: None


create(path string) ?File

creates a file at a specified location and returns a writable `File` object.

Tags:

Applies to: None


dir_exists(path string) bool


Tags:

Applies to: None


dir(path string) string


Tags:

Applies to: None


environ() map[string]string

returns a map of all the current environment variables

Tags:

Applies to: None


exec(cmd string) ?Result

starts the specified command, waits for it to complete, and returns its output.

Tags:

Applies to: None


executable() string

returns the path name of the executable that started the current process.

Tags:

Applies to: None


exists(path string) bool

returns true if `path` exists.

Tags:

Applies to: None


file_exists(_path string) bool


Tags:

Applies to: None


file_ext(path string) string


Tags:

Applies to: None


file_last_mod_unix(path string) int


Tags:

Applies to: None


file_name(path string) string


Tags:

Applies to: None


file_size(path string) int

returns the size of the file located in `path`.

Tags:

Applies to: None


find_abs_path_of_executable(exepath string) ?string

walks the environment PATH, just like most shell do, it returns
the absolute path of the executable if found

Tags:

Applies to: None


flush_stdout()


Tags:

Applies to: None


flush()


Tags:

Applies to: File,None


fork() int


Tags:

Applies to: None


free(b byteptr)


Tags:

Applies to: None


fseek(pos, mode int)


Tags:

Applies to: File


get_error_msg(code int) string

return error code representation in string.

Tags:

Applies to: None


get_file_handle(path string) HANDLE

retrieves the operating-system file handle that is associated with the specified file descriptor.

Tags:

Applies to: None


get_line() string

returns a one-line string from stdin

Tags:

Applies to: None


get_lines_joined() string


Tags:

Applies to: None


get_lines() []string


Tags:

Applies to: None


get_module_filename(handle HANDLE) ?string

get_module_filename retrieves the fully qualified path for the file that contains the specified module.
The module must have been loaded by the current process.

Tags:

Applies to: None


get_raw_line() string

returns a one-line string from stdin along with '\n' if there is any

Tags:

Applies to: None


getenv(key string) string

returns the value of the environment variable named by the key.

Tags:

Applies to: None


getwd() string

returns the absolute path name of the current directory.

Tags:

Applies to: None


home_dir() string

returns path to user's home directory.

Tags:

Applies to: None


inode(path string) FileMode

returns the mode of the file/inode containing inode type and permission information
it supports windows for regular files but it doesn't matter if you use owner, group or others when checking permissions on windows

Tags:

Applies to: None


input(prompt string) string

returns a one-line string from stdin, after printing a prompt

Tags:

Applies to: None


is_abs_path(path string) bool

returns true if `path` is absolute.

Tags:

Applies to: None


is_dir_empty(path string) bool


Tags:

Applies to: None


is_dir(path string) bool

returns a boolean indicating whether the given path is a directory.

Tags:

Applies to: None


is_executable(path string) bool

returns `true` if `path` is executable.

Tags:

Applies to: None


is_link(path string) bool

returns a boolean indicating whether the given path is a link.

Tags:

Applies to: None


is_opened() bool


Tags:

Applies to: File


is_readable(path string) bool

`is_readable` returns `true` if `path` is readable.

Tags:

Applies to: None


is_writable_folder(folder string) ?bool

`folder` exists and is writable to the process

Tags:

Applies to: None


is_writable(path string) bool

returns `true` if `path` is writable.

Tags:

Applies to: None


join_path(base string, dirs ...string) string

returns path as string from string parameter(s).

Tags:

Applies to: None


log(s string)


Tags:

Applies to: None


ls(path string) ?[]string


Tags:

Applies to: None


malloc(n int) byteptr


Tags:

Applies to: None


mkdir_all(path string)


Tags:

Applies to: None


mkdir(path string) ?bool

creates a new directory with the specified path.

Tags:

Applies to: None


mv_by_cp(source string, target string) ?bool

mv_by_cp first copies the source file, and if it is copied successfully, deletes the source file.
mv_by_cp may be used when you are not sure that the source and target are on the same mount/partition.

Tags:

Applies to: None


mv(old, new string)


Tags:

Applies to: None


on_segfault(f voidptr)


Tags:

Applies to: None


open_append(path string) ?File


Tags:

Applies to: None


open_file(path string, mode string, options ...int) ?File

can be used to open or create a file with custom flags and permissions and returns a `File` object

Tags:

Applies to: None


open(path string) ?File


Tags:

Applies to: None


posix_get_error_msg(code int) string

return error code representation in string.

Tags:

Applies to: None


println(s string)


Tags:

Applies to: None


read_bytes_at(size, pos int) []byte

reads an amount of bytes at the given position in the file

Tags:

Applies to: &File


read_bytes(path string) ?[]byte


Tags:

Applies to: None


read_bytes(size int) []byte

reads an amount of bytes from the beginning of the file

Tags:

Applies to: &File


read_file(path string) ?string

reads the file in `path` and returns the contents.

Tags:

Applies to: None


read_lines(path string) ?[]string

reads the file in `path` into an array of lines.

Tags:

Applies to: None


real_path(fpath string) string

Returns the full absolute path for fpath, with all relative ../../, symlinks and so on resolved.
See http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html
Also https://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
and https://insanecoding.blogspot.com/2007/11/implementing-realpath-in-c.html
NB: this particular rabbit hole is *deep* …

Tags:

Applies to: None


resource_abs_path(path string) string

returns an absolute path, for the given `path`
(the path is expected to be relative to the executable program)
See https://discordapp.com/channels/592103645835821068/592294828432424960/630806741373943808
It gives a convenient way to access program resources like images, fonts, sounds and so on,
*no matter* how the program was started, and what is the current working directory.

Tags:

Applies to: None


rm(path string)

removes file in `path`.

Tags:

Applies to: None


rmdir_all(path string)


Tags:

Applies to: None


rmdir_recursive(path string)


Tags:

Applies to: None


rmdir(path string)

removes a specified directory.

Tags:

Applies to: None


setenv(name string, value string, overwrite bool) int

sets the value of an environment variable with `name` to `value`.

Tags:

Applies to: None


sigint_to_signal_name(si int) string


Tags:

Applies to: None


signal(signum int, handler voidptr)


Tags:

Applies to: None


symlink(origin, target string) ?bool


Tags:

Applies to: None


system(cmd string) int

works like `exec()`, but only returns a return code.

Tags:

Applies to: None


temp_dir() string

returns the path to a folder, that is suitable for storing temporary files

Tags:

Applies to: None


unsetenv(name string) int

clears an environment variable with `name`.

Tags:

Applies to: None


user_os() string

returns current user operating system name.

Tags:

Applies to: None


wait() int


Tags:

Applies to: None


walk_ext(path, ext string) []string

returns a recursive list of all file paths ending with `ext`.

Tags:

Applies to: None


walk(path string, f fn(path string))

recursively traverses the given directory path.
When a file is encountred it will call the callback function with current file as argument.

Tags:

Applies to: None


write_bytes_at(data voidptr, size, pos int)


Tags:

Applies to: File


write_bytes(data voidptr, size int)


Tags:

Applies to: File


write_file(path, text string)

writes `text` data to a file in `path`.

Tags:

Applies to: None


write(fd int, data voidptr, nbytes int) int


Tags:

Applies to: None


write(s string)


Tags:

Applies to: File


writeln(s string)


Tags:

Applies to: File

os.cmdline


only_non_options(args []string) []string

Fetch all options not start with '-', e.g.
args: ['-d', 'aa', '--help', 'bb']
ret: ['aa', 'bb']

Tags: cmdline

Applies to: None


only_options(args []string) []string

Fetch all options start with '-', e.g.
args: ['-d', 'aa', '--help', 'bb']
ret: ['-d', '--help']

Tags: cmdline

Applies to: None


option(args []string, param string, def string) string

Fetch option by param, e.g.
args: ['v', '-d', 'aa']
param: '-d'
def: ''
ret: 'aa'

Tags: cmdline

Applies to: None


options_after(args []string, what []string) []string

Fetch all options after what params, e.g.
args: ['-stat', 'test', 'aaa.v']
what: ['test']
ret: ['aaa.v']

Tags: cmdline

Applies to: None


options_before(args []string, what []string) []string

Fetch all options before what params, e.g.
args: ['-stat', 'test', 'aaa.v']
what: ['test']
ret: ['-stat']

Tags: cmdline

Applies to: None


options(args []string, param string) []string

Fetch multiple option by param, e.g.
args: ['v', '-d', 'aa', '-d', 'bb', '-d', 'cc']
param: '-d'
ret: ['aa', 'bb', 'cc']

Tags: cmdline

Applies to: None

os2


close()


Tags:

Applies to: File


create(path string) ?File


Tags:

Applies to: None


writeln(s string)


Tags:

Applies to: File

pg


connect(config pg.Config) ?DB


Tags: db, postgres

Applies to: None


exec_one(query string) ?pg.Row


Tags: db, postgres

Applies to: DB


exec_param_many(query string, params []string) []pg.Row

The entire function can be considered unsafe because of the malloc and the
free. This prevents warnings and doesn't seem to affect behavior.

Tags: db, postgres

Applies to: DB


exec_param(query string, param string) []pg.Row


Tags: db, postgres

Applies to: DB


exec_param2(query string, param, param2 string) []pg.Row


Tags: db, postgres

Applies to: DB


exec(query string) []pg.Row


Tags: db, postgres

Applies to: DB


q_int(query string) int


Tags: db, postgres

Applies to: DB


q_string(query string) string


Tags: db, postgres

Applies to: DB


q_strings(query string) []pg.Row


Tags: db, postgres

Applies to: DB

picoev


new(port int, cb voidptr) &Picoev


Tags:

Applies to: None


serve()


Tags:

Applies to: Picoev

picohttpparser


body(body string)


Tags:

Applies to: Response


cmp(dst, src string) bool


Tags:

Applies to: None


cmpn(dst, src string, n int) bool


Tags:

Applies to: None


content_type(s string) &Response


Tags:

Applies to: Response


end() int


Tags:

Applies to: Response


header_date() &Response


Tags:

Applies to: Response


header_server() &Response


Tags:

Applies to: Response


header(k, v string) &Response


Tags:

Applies to: Response


http_404()


Tags:

Applies to: Response


http_405()


Tags:

Applies to: Response


http_500()


Tags:

Applies to: Response


http_ok() &Response


Tags:

Applies to: Response


json() &Response


Tags:

Applies to: Response


parse_request_path_pipeline(s string) int


Tags:

Applies to: Request


parse_request_path(s string) int


Tags:

Applies to: Request


parse_request(s string, headers *C.phr_header_t, max_headers int) int


Tags:

Applies to: Request


plain() &Response


Tags:

Applies to: Response


raw(response string)


Tags:

Applies to: Response

rand


bounded_next(bound u32) u32

update the PRNG state. Get the next number <  bound
param bound - the returned random number will be < bound
Return the generated pseudo random number

Tags: rand

Applies to: Pcg32


bounded_next(bound u64) u64

Get the next random number < bound
param bound - the returned random number will be < bound
Return the generated pseudo random number

Tags: rand

Applies to: Splitmix64


new_pcg32(initstate u64, initseq u64) Pcg32

a Pcg32 PRNG generator
param initstate - the initial state of the PRNG.
param initseq - the stream/step of the PRNG.
Return a new Pcg32 PRNG instance

Tags: rand

Applies to: None


new_splitmix64(seed u64) Splitmix64

a Splitmix64 PRNG generator
Param seed the initial seed of the PRNG.
return a new Splitmix64 PRNG instance

Tags: rand

Applies to: None


next() u32

update the PRNG state and get back the next random number
Return the generated pseudo random number

Tags: rand

Applies to: Pcg32


next() u64

update the PRNG state and get back the next random number
Return the generated pseudo random number

Tags: rand

Applies to: Splitmix64


next(max int) int


Tags: rand

Applies to: None


rand_r(seed &int) int

returns a pseudo-random number;
writes a result value to the seed argument.

Tags: rand

Applies to: None


seed(s int)


Tags: rand

Applies to: None

readline


disable_raw_mode()

Disable the raw mode of the terminal

Tags:

Applies to: Readline


enable_raw_mode_nosig()

Enable the raw mode of the terminal
Does not catch the SIGUSER (CTRL+C) Signal

Tags:

Applies to: Readline


enable_raw_mode()

Enable the raw mode of the terminal
In raw mode all keypresses are directly sent to the program and no interpretation is done
Catches the SIGUSER (CTRL+C) Signal

Tags:

Applies to: Readline


read_char() int

Read a single char

Tags:

Applies to: Readline


read_line_utf8(prompt string) ?ustring

Main function of the readline module
Will loop and ingest characters until EOF or Enter
Returns the completed line as utf8 ustring
Will return an error if line is empty

Tags:

Applies to: None,Readline


read_line(prompt string) ?string

Returns the string from the utf8 ustring

Tags:

Applies to: None,Readline

regex


compile(in_txt string) (int,int)

returns (return code, index) where index is the index of the error in the query string if return code is an error code

Tags: regex

Applies to: RE


find_all(in_txt string) []int

find all the non overlapping occurrences of the match pattern

Tags: regex

Applies to: RE


find(in_txt string) (int,int)

try to find the first match in the input string

Tags: regex

Applies to: RE


get_code() string

return the compiled code as regex string, note: may be different from the source!

Tags: regex

Applies to: RE


get_group(group_name string) (int, int)


Tags: regex

Applies to: RE


get_parse_error_string(err int) string


Tags: regex

Applies to: RE


get_query() string

return a string with a reconstruction of the query starting from the regex program code

Tags: regex

Applies to: RE


match_base(in_txt byteptr, in_txt_len int ) (int,int)


Tags: regex

Applies to: RE


match_string(in_txt string) (int,int)


Tags: regex

Applies to: RE


new_regex_by_size(mult int) RE

create a RE of large size, mult specify the scale factor of the memory that will be allocated

Tags: regex

Applies to: None


new_regex() RE

create a RE of small size, usually sufficient for ordinary use

Tags: regex

Applies to: None


regex(in_query string) (RE,int,int)

create a regex object from the query string

Tags: regex

Applies to: None


replace(in_txt string, repl string) string

return a string where the matches are replaced with the replace string

Tags: regex

Applies to: RE

runtime


is_32bit() bool


Tags:

Applies to: None


is_64bit() bool


Tags:

Applies to: None


is_big_endian() bool


Tags:

Applies to: None


is_little_endian() bool


Tags:

Applies to: None


nr_cpus() int


Tags:

Applies to: None


nr_jobs() int


Tags:

Applies to: None

sokol.gfx


activate_context(ctx_id C.sg_context)


Tags:

Applies to: None


append_buffer(buf C.sg_buffer, ptr voidptr, num_bytes int) int


Tags:

Applies to: None


append_index_buffer(data voidptr, element_size int, element_count int) int


Tags:

Applies to: &C.sg_bindings


append_vert_buffer(index int, data voidptr, element_size int, element_count int) int


Tags:

Applies to: &C.sg_bindings


apply_bindings(bindings &C.sg_bindings)


Tags:

Applies to: None


apply_pipeline(pip C.sg_pipeline)


Tags:

Applies to: None


apply_scissor_rect(x int, y int, width int, height int, origin_top_left bool)


Tags:

Applies to: None


apply_uniforms(stage int, ub_index int, data voidptr, num_bytes int)


Tags:

Applies to: None


apply_viewport(x int, y int, width int, height int, origin_top_left bool)


Tags:

Applies to: None


begin_default_pass(actions &C.sg_pass_action, width int, height int)


Tags:

Applies to: None


begin_pass(pass C.sg_pass, actions &C.sg_pass_action)


Tags:

Applies to: None


commit()


Tags:

Applies to: None


create_clear_pass(r, g, b, a f32) C.sg_pass_action


Tags:

Applies to: None


destroy_buffer(buf C.sg_buffer)


Tags:

Applies to: None


destroy_image(img C.sg_image)


Tags:

Applies to: None


destroy_pass(pass C.sg_pass)


Tags:

Applies to: None


destroy_pipeline(pip C.sg_pipeline)


Tags:

Applies to: None


destroy_shader(shd C.sg_shader)


Tags:

Applies to: None


discard_context(ctx_id C.sg_context)


Tags:

Applies to: None


draw(base_element int, num_elements int, num_instances int)


Tags:

Applies to: None


end_pass()


Tags:

Applies to: None


free()


Tags:

Applies to: C.sg_buffer,C.sg_image,C.sg_pass,C.sg_pipeline,C.sg_shader


make_buffer(desc &C.sg_buffer_desc) C.sg_buffer


Tags:

Applies to: None


make_image(desc &C.sg_image_desc) C.sg_image


Tags:

Applies to: None


make_pass(desc &C.sg_pass_desc) C.sg_pass


Tags:

Applies to: None


make_pipeline(desc &C.sg_pipeline_desc) C.sg_pipeline


Tags:

Applies to: None


make_shader() C.sg_shader


Tags:

Applies to: &C.sg_shader_desc


make_shader(desc &C.sg_shader_desc) C.sg_shader


Tags:

Applies to: None


query_backend() Backend


Tags:

Applies to: None


query_buffer_defaults(desc &C.sg_buffer) C.sg_buffer_desc


Tags:

Applies to: None


query_buffer_info(buf C.sg_buffer) C.sg_buffer_info


Tags:

Applies to: None


query_buffer_overflow(buf C.sg_buffer) bool


Tags:

Applies to: None


query_buffer_state(buf C.sg_buffer) C.sg_resource_state


Tags:

Applies to: None


query_desc() C.sg_desc


Tags:

Applies to: None


query_features() C.sg_features


Tags:

Applies to: None


query_image_defaults(desc &C.sg_image) C.sg_image_desc


Tags:

Applies to: None


query_image_info(img C.sg_image) C.sg_image_info


Tags:

Applies to: None


query_image_state(img C.sg_image) C.sg_resource_state


Tags:

Applies to: None


query_limits() C.sg_limits


Tags:

Applies to: None


query_pass_defaults(desc &C.sg_pass) C.sg_pass_desc


Tags:

Applies to: None


query_pass_info(pass C.sg_pass) C.sg_pass_info


Tags:

Applies to: None


query_pass_state(pass C.sg_pass) C.sg_resource_state


Tags:

Applies to: None


query_pipeline_defaults(desc &C.sg_pipeline) C.sg_pipeline_desc


Tags:

Applies to: None


query_pipeline_info(pip C.sg_pipeline) C.sg_pipeline_info


Tags:

Applies to: None


query_pipeline_state(pip C.sg_pipeline) C.sg_resource_state


Tags:

Applies to: None


query_pixelformat(fmt PixelFormat) C.sg_pixelformat_info


Tags:

Applies to: None


query_shader_defaults(desc &C.sg_shader) C.sg_shader_desc


Tags:

Applies to: None


query_shader_info(shd C.sg_shader) C.sg_shader_info


Tags:

Applies to: None


query_shader_state(shd C.sg_shader) C.sg_resource_state


Tags:

Applies to: None


reset_state_cache()


Tags:

Applies to: None


set_color_values(r, g, b, a f32)


Tags:

Applies to: C.sg_color_attachment_action


set_frag_image(index int, img C.sg_image)


Tags:

Applies to: C.sg_bindings


set_frag_image(index int, name string) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


set_frag_src(src string) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


set_frag_uniform_block_size(block_index, size int) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


set_frag_uniform(block_index int, uniform_index int, name string, @type UniformType, array_count int) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


set_image(index int, name string) C.sg_shader_stage_desc


Tags:

Applies to: C.sg_shader_stage_desc


set_vert_image(index int, img C.sg_image)


Tags:

Applies to: C.sg_bindings


set_vert_image(index int, name string) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


set_vert_src(src string) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


set_vert_uniform_block_size(block_index, size int) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


set_vert_uniform(block_index int, uniform_index int, name string, @type UniformType, array_count int) &C.sg_shader_desc


Tags:

Applies to: C.sg_shader_desc


setup_context() C.sg_context


Tags:

Applies to: None


setup(desc &C.sg_desc)


Tags:

Applies to: None


shutdown()


Tags:

Applies to: None


update_buffer(buf C.sg_buffer, ptr voidptr, num_bytes int)


Tags:

Applies to: None


update_image(img C.sg_image, content &C.sg_image_content)


Tags:

Applies to: None


update_index_buffer(data voidptr, element_size int, element_count int)


Tags:

Applies to: &C.sg_bindings


update_vert_buffer(index int, data voidptr, element_size int, element_count int)


Tags:

Applies to: &C.sg_bindings

sokol.sapp


android_get_native_activity() voidptr

Android: get native activity handle

Tags:

Applies to: None


cancel_quit()

cancel a pending quit (when SAPP_EVENTTYPE_QUIT_REQUESTED has been received)

Tags:

Applies to: None


consume_event()

call from inside event callback to consume the current event (don't forward to platform)

Tags:

Applies to: None


d3d11_get_depth_stencil_view() voidptr

D3D11: get pointer to ID3D11DepthStencilView

Tags:

Applies to: None


d3d11_get_device_context() voidptr

D3D11: get pointer to ID3D11DeviceContext object

Tags:

Applies to: None


d3d11_get_device() voidptr

D3D11: get pointer to ID3D11Device object

Tags:

Applies to: None


d3d11_get_render_target_view() voidptr

D3D11: get pointer to ID3D11RenderTargetView object

Tags:

Applies to: None


dpi_scale() f32

returns the dpi scaling factor (window pixels to framebuffer pixels)

Tags:

Applies to: None


frame_count() u64

get the current frame counter (for comparison with sapp_event.frame_count)

Tags:

Applies to: None


get_clipboard_string() byteptr

read string from clipboard (usually during SAPP_EVENTTYPE_CLIPBOARD_PASTED)

Tags:

Applies to: None


gles2() bool

GL: return true when GLES2 fallback is active (to detect fallback from GLES3)

Tags:

Applies to: None


height() int

returns the current framebuffer height in pixels

Tags:

Applies to: None


high_dpi() bool

returns true when high_dpi was requested and actually running in a high-dpi scenario

Tags:

Applies to: None


html5_ask_leave_site(ask bool)

HTML5: enable or disable the hardwired "Leave Site?" dialog box

Tags:

Applies to: None


ios_get_window() voidptr

iOS: get ARC-bridged pointer to iOS UIWindow

Tags:

Applies to: None


isvalid() bool

returns true after sokol-app has been initialized

Tags:

Applies to: None


keyboard_shown() bool

return true if the mobile device onscreen keyboard is currently shown

Tags:

Applies to: None


macos_get_window() voidptr

macOS: get ARC-bridged pointer to macOS NSWindow

Tags:

Applies to: None


metal_get_device() voidptr

Metal: get ARC-bridged pointer to Metal device object

Tags:

Applies to: None


metal_get_drawable() voidptr

Metal: get ARC-bridged pointer to current drawable

Tags:

Applies to: None


metal_get_renderpass_descriptor() voidptr

Metal: get ARC-bridged pointer to this frame's renderpass descriptor

Tags:

Applies to: None


mouse_shown() bool

show or hide the mouse cursor

Tags:

Applies to: None


query_desc() C.sapp_desc

return a copy of the sapp_desc structure

Tags:

Applies to: None


quit()

initiate a "hard quit" (quit application without sending SAPP_EVENTTYPE_QUIT_REQUSTED)

Tags:

Applies to: None


request_quit()

initiate a "soft quit" (sends SAPP_EVENTTYPE_QUIT_REQUESTED)

Tags:

Applies to: None


run(desc &C.sapp_desc) int

special run-function for SOKOL_NO_ENTRY (in standard mode this is an empty stub)

Tags:

Applies to: None


set_clipboard_string(str byteptr)

write string into clipboard

Tags:

Applies to: None


show_keyboard(visible bool)

show or hide the mobile device onscreen keyboard

Tags:

Applies to: None


show_mouse(visible bool)

show or hide the mouse cursor

Tags:

Applies to: None


str() string


Tags:

Applies to: &C.sapp_event


userdata() voidptr

return the userdata pointer optionally provided in sapp_desc

Tags:

Applies to: None


width() int

returns the current framebuffer width in pixels

Tags:

Applies to: None


win32_get_hwnd() voidptr

Win32: get the HWND window handle

Tags:

Applies to: None

sokol.sfons


create(width int, height int, flags int) &C.FONScontext


Tags:

Applies to: None


destroy(ctx &C.FONScontext)


Tags:

Applies to: None


flush(ctx &C.FONScontext)


Tags:

Applies to: None


rgba(r byte, g byte, b byte, a byte) u32


Tags:

Applies to: None

sokol.sgl


begin_line_strip()


Tags:

Applies to: None


begin_lines()


Tags:

Applies to: None


begin_points()


Tags:

Applies to: None


begin_quads()


Tags:

Applies to: None


begin_triangle_strip()


Tags:

Applies to: None


begin_triangles()


Tags:

Applies to: None


c1i(rgba u32)


Tags:

Applies to: None


c3b(r byte, g byte, b byte)


Tags:

Applies to: None


c3f(r f32, g f32, b f32)


Tags:

Applies to: None


c4b(r byte, g byte, b byte, a byte)


Tags:

Applies to: None


c4f(r f32, g f32, b f32, a f32)


Tags:

Applies to: None


default_pipeline()


Tags:

Applies to: None


defaults()


Tags:

Applies to: None


deg(rad f32) f32


Tags:

Applies to: None


destroy_pipeline(pip C.sgl_pipeline)

destroy pipeline objects

Tags:

Applies to: None


disable_texture()


Tags:

Applies to: None


draw()

render everything

Tags:

Applies to: None


enable_texture()


Tags:

Applies to: None


end()


Tags:

Applies to: None


error() C.sgl_error_t


Tags:

Applies to: None


frustum(l f32, r f32, b f32, t f32, n f32, f f32)


Tags:

Applies to: None


load_identity()


Tags:

Applies to: None


load_matrix(m []f32)


Tags:

Applies to: None


load_pipeline(pip C.sgl_pipeline)


Tags:

Applies to: None


load_transpose_matrix(m []f32)


Tags:

Applies to: None


lookat(eye_x f32, eye_y f32, eye_z f32, center_x f32, center_y f32, center_z f32, up_x f32, up_y f32, up_z f32)


Tags:

Applies to: None


make_pipeline(desc &C.sg_pipeline_desc) C.sgl_pipeline

create pipeline objects

Tags:

Applies to: None


matrix_mode_modelview()


Tags:

Applies to: None


matrix_mode_projection()


Tags:

Applies to: None


matrix_mode_texture()


Tags:

Applies to: None


mult_matrix(m []f32)


Tags:

Applies to: None


mult_transpose_matrix(m []f32)


Tags:

Applies to: None


ortho(l f32, r f32, b f32, t f32, n f32, f f32)


Tags:

Applies to: None


perspective(fov_y f32, aspect f32, z_near f32, z_far f32)


Tags:

Applies to: None


pop_matrix()


Tags:

Applies to: None


pop_pipeline()


Tags:

Applies to: None


push_matrix()


Tags:

Applies to: None


push_pipeline()


Tags:

Applies to: None


rad(deg f32) f32


Tags:

Applies to: None


rotate(angle_rad f32, x f32, y f32, z f32)


Tags:

Applies to: None


scale(x f32, y f32, z f32)


Tags:

Applies to: None


scissor_rect(x int, y int, w int, h int, origin_top_left bool)


Tags:

Applies to: None


setup(desc &C.sgl_desc_t)


Tags:

Applies to: None


shutdown()


Tags:

Applies to: None


t2f(u f32, v f32)


Tags:

Applies to: None


texture(img C.sg_image)


Tags:

Applies to: None


translate(x f32, y f32, z f32)


Tags:

Applies to: None


v2f_c1i(x f32, y f32, rgba u32)


Tags:

Applies to: None


v2f_c3b(x f32, y f32, r byte, g byte, b byte)


Tags:

Applies to: None


v2f_c3f(x f32, y f32, r f32, g f32, b f32)


Tags:

Applies to: None


v2f_c4b(x f32, y f32, r byte, g byte, b byte, a byte)


Tags:

Applies to: None


v2f_c4f(x f32, y f32, r f32, g f32, b f32, a f32)


Tags:

Applies to: None


v2f_t2f_c1i(x f32, y f32, u f32, v f32, rgba u32)


Tags:

Applies to: None


v2f_t2f_c3b(x f32, y f32, u f32, v f32, r byte, g byte, b byte)


Tags:

Applies to: None


v2f_t2f_c3f(x f32, y f32, u f32, v f32, r f32, g f32, b f32)


Tags:

Applies to: None


v2f_t2f_c4b(x f32, y f32, u f32, v f32, r byte, g byte, b byte, a byte)


Tags:

Applies to: None


v2f_t2f_c4f(x f32, y f32, u f32, v f32, r f32, g f32, b f32, a f32)


Tags:

Applies to: None


v2f_t2f(x f32, y f32, u f32, v f32)


Tags:

Applies to: None


v2f(x f32, y f32)


Tags:

Applies to: None


v3f_c1i(x f32, y f32, z f32, rgba u32)


Tags:

Applies to: None


v3f_c3b(x f32, y f32, z f32, r byte, g byte, b byte)


Tags:

Applies to: None


v3f_c3f(x f32, y f32, z f32, r f32, g f32, b f32)


Tags:

Applies to: None


v3f_c4b(x f32, y f32, z f32, r byte, g byte, b byte, a byte)


Tags:

Applies to: None


v3f_c4f(x f32, y f32, z f32, r f32, g f32, b f32, a f32)


Tags:

Applies to: None


v3f_t2f_c1i(x f32, y f32, z f32, u f32, v f32, rgba u32)


Tags:

Applies to: None


v3f_t2f_c3b(x f32, y f32, z f32, u f32, v f32, r byte, g byte, b byte)


Tags:

Applies to: None


v3f_t2f_c3f(x f32, y f32, z f32, u f32, v f32, r f32, g f32, b f32)


Tags:

Applies to: None


v3f_t2f_c4b(x f32, y f32, z f32, u f32, v f32, r byte, g byte, b byte, a byte)


Tags:

Applies to: None


v3f_t2f_c4f(x f32, y f32, z f32, u f32, v f32, r f32, g f32, b f32, a f32)


Tags:

Applies to: None


v3f_t2f(x f32, y f32, z f32, u f32, v f32)


Tags:

Applies to: None


v3f(x f32, y f32, z f32)


Tags:

Applies to: None


viewport(x int, y int, w int, h int, origin_top_left bool)


Tags:

Applies to: None

sqlite


connect(path string) DB

Opens the connection with a database.

Tags: db, sqlite

Applies to: None


exec_none(query string) int

In case you don't expect any result, but still want an error code
e.g. INSERT INTO ... VALUES (…)

Tags: db, sqlite

Applies to: DB


exec_one(query string) ?Row

Execute a query, handle error code
Return the first row from the resulting table

Tags: db, sqlite

Applies to: DB


exec_param(query string, param string) []Row


Tags: db, sqlite

Applies to: DB


exec(query string) ([]Row,int)

Execute the query on db, return an array of all the results, alongside any result code.

Tags: db, sqlite

Applies to: DB


q_int(query string) int

Returns a single cell with value int.

Tags: db, sqlite

Applies to: DB


q_string(query string) string

Returns a single cell with value string.

Tags: db, sqlite

Applies to: DB

stbi


load_from_memory(buf []byte) Image


Tags:

Applies to: None


free()


Tags:

Applies to: Image


load_from_memory(buf byteptr) Image


Tags:

Applies to: None


load(path string) Image


Tags:

Applies to: None


set_flip_vertically_on_load(val bool)


Tags:

Applies to: None


tex_image_2d()


Tags:

Applies to: Image

strconv


atof64(s string) f64

return a f64 from a string doing a parsing operation

Tags: conv

Applies to: None


atoi(s string) int

equivalent to parse_int(s, 10, 0), converted to type int.

Tags: conv

Applies to: None


common_parse_int(_s string, base int, _bit_size int, error_on_non_digit bool, error_on_high_digit bool) i64

called by parse int and allows the parsing to stop on non or invalid digit characters and return the result so far

Tags: conv

Applies to: None


common_parse_uint(s string, _base int, _bit_size int, error_on_non_digit bool, error_on_high_digit bool) u64

called by parse_uint and allows the parsing to stop on non or invalid digit characters and return the result so far

Tags: conv

Applies to: None


f64_to_str_lnd(f f64, dec_digit int) string


Tags: conv

Applies to: None


format_dec(d u64, p BF_param) string


Tags: conv

Applies to: None


format_es(f f64, p BF_param) string


Tags: conv

Applies to: None


format_fl(f f64, p BF_param) string


Tags: conv

Applies to: None


format_str(s string, p BF_param) string


Tags: conv

Applies to: None


parse_int(_s string, base int, _bit_size int) i64

interprets a string s in the given base (0, 2 to 36) and
bit size (0 to 64) and returns the corresponding value i.

If the base argument is 0, the true base is implied by the string's
prefix: 2 for "0b", 8 for "0" or "0o", 16 for "0x", and 10 otherwise.
Also, for argument base 0 only, underscore characters are permitted
as defined by the Go syntax for integer literals.

The bitSize argument specifies the integer type
that the result must fit into. Bit sizes 0, 8, 16, 32, and 64
correspond to int, int8, int16, int32, and int64.
If bitSize is below 0 or above 64, an error is returned.

Tags: conv

Applies to: None


parse_uint(s string, _base int, _bit_size int) u64

like parse_int but for unsigned numbers.

Tags: conv

Applies to: None


remove_tail_zeros(s string) string


Tags: conv

Applies to: None


v_printf(str string, pt ... voidptr)


Tags: conv

Applies to: None


v_sprintf(str string, pt ... voidptr) string


Tags: conv

Applies to: None

strconv.atofq


atof_quick(s string) f64

return a f64 number from a string in a quick way

Tags: conv

Applies to: None

strconv.ftoa


f32_to_decimal(mant u32, exp u32) Dec32


Tags: conv

Applies to: None


f32_to_str_l(f f64) string

return a string with the f32 converted in a strign in decimal notation

Tags: conv

Applies to: None


f32_to_str_pad(f f32, n_digit int) string

return a string in scientific notation with max n_digit after the dot

Tags: conv

Applies to: None


f32_to_str(f f32, n_digit int) string

return a string in scientific notation with max n_digit after the dot

Tags: conv

Applies to: None


f64_to_str_l(f f64) string

return a string with the f64 converted in a strign in decimal notation

Tags: conv

Applies to: None


f64_to_str_pad(f f64, n_digit int) string

return a string in scientific notation with max n_digit after the dot

Tags: conv

Applies to: None


f64_to_str(f f64, n_digit int) string

return a string in scientific notation with max n_digit after the dot

Tags: conv

Applies to: None


ftoa_32(f f32) string


Tags: conv

Applies to: None


ftoa_64(f f64) string


Tags: conv

Applies to: None


ftoa_long_32(f f32) string


Tags: conv

Applies to: None


ftoa_long_64(f f64) string


Tags: conv

Applies to: None

strings


after(n int) string

buf == 'hello world'
after(6) returns 'world'

Tags:

Applies to: &Builder


cut(n int)


Tags:

Applies to: Builder


dice_coefficient(s1, s2 string) f32

implementation of Sørensen–Dice coefficient.
find the similarity between two strings.
returns coefficient between 0.0 (not similar) and 1.0 (exact match).

Tags:

Applies to: None


free()


Tags:

Applies to: Builder


go_back_to(pos int)


Tags:

Applies to: Builder


go_back(n int)


Tags:

Applies to: Builder


last_n(n int) string

buf == 'hello world'
last_n(5) returns 'world'

Tags:

Applies to: &Builder


levenshtein_distance_percentage(a, b string) f32

use levenshtein distance algorithm to calculate how similar two strings are as a percentage (higher is closer)

Tags:

Applies to: None


levenshtein_distance(a, b string) int

use levenshtein distance algorithm to calculate the distance between between two strings (lower is closer)

Tags:

Applies to: None


new_builder(initial_size int) Builder


Tags:

Applies to: None


repeat_string(s string, n int) string


Tags:

Applies to: None


repeat(c byte, n int) string


Tags:

Applies to: None


str() string


Tags:

Applies to: Builder


write_b(data byte)


Tags:

Applies to: Builder


write_bytes(bytes byteptr, howmany int)


Tags:

Applies to: Builder


write(s string)


Tags:

Applies to: Builder


writeln(s string)


Tags:

Applies to: Builder

sync


get_item<T>(idx int) T

alled by the worker callback.
Retrieves a type safe instance of the currently processed item

Tags: async

Applies to: &PoolProcessor


get_result<T>(idx int) T


Tags: async

Applies to: &PoolProcessor


get_results<T>() []T

can be called to get a list of type safe results.

Tags: async

Applies to: &PoolProcessor


work_on_items<T>(items []T)

receives a list of items of type T,
then starts a work pool of pool.njobs threads, each running
pool.thread_cb in a loop, untill all items in the list,
are processed.
When pool.njobs is 0, the number of jobs is determined
by the number of available cores on the system.
work_on_items returns *after* all threads finish.
You can optionally call get_results after that.

Tags: async

Applies to: PoolProcessor


add(delta int)


Tags: async

Applies to: WaitGroup


destroy()


Tags: async

Applies to: Mutex


done()


Tags: async

Applies to: WaitGroup


get_int_item(idx int) int

called by the worker callback.
It does not use generics so it does not mess up vfmt.
TODO: remove the need for this when vfmt becomes smarter.

Tags: async

Applies to: &PoolProcessor


get_results_i() []IResult


Tags: async

Applies to: &PoolProcessor


get_results_s() []SResult


Tags: async

Applies to: &PoolProcessor


get_shared_context() voidptr

can be called in each worker callback, to get
the context set by pool.set_shared_context

Tags: async

Applies to: &PoolProcessor


get_string_item(idx int) string

called by the worker callback.
It does not use generics so it does not mess up vfmt.
TODO: remove the need for this when vfmt becomes smarter.

Tags: async

Applies to: &PoolProcessor


get_thread_context(idx int) voidptr

returns a pointer, that was set with
pool.set_thread_context . This pointer is private to each thread.

Tags: async

Applies to: &PoolProcessor


lock()


Tags: async

Applies to: Mutex


new_mutex() &Mutex


Tags: async

Applies to: None


new_pool_processor(context PoolProcessorConfig) &PoolProcessor

returns a new PoolProcessor instance.

Tags: async

Applies to: None


new_waitgroup() &WaitGroup


Tags: async

Applies to: None


set_max_jobs(njobs int)

gives you the ability to override the number
of jobs *after* the PoolProcessor had been created already.

Tags: async

Applies to: PoolProcessor


set_shared_context(context voidptr)

can be called during the setup so that you can
provide a context that is shared between all worker threads, like
common options/settings.

Tags: async

Applies to: PoolProcessor


set_thread_context(idx int, context voidptr)

can be called during the setup at the start of
each worker callback, so that the worker callback can have some thread
local storage area where it can write/read information that is private
to the given thread, without worrying that it will get overwritten by
another thread

Tags: async

Applies to: PoolProcessor


unlock()


Tags: async

Applies to: Mutex


wait()


Tags: async

Applies to: &WaitGroup


work_on_items_i(items []int)


Tags: async

Applies to: PoolProcessor


work_on_items_s(items []string)


Tags: async

Applies to: PoolProcessor


work_on_pointers(items []voidptr)


Tags: async

Applies to: PoolProcessor

szip


close_entry()

closes a zip entry, flushes buffer and releases resources.

param zip zip archive handler.

return the return code - 0 on success, negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr


close()

closes the zip archive, releases resources - always finalize.

param zip zip archive handler.

Tags: zip

Applies to: zip_ptr


crc32() u32

returns CRC-32 checksum of the current zip entry.

param zip zip archive handler.

return the CRC-32 checksum.

Tags: zip

Applies to: zip_ptr


create_entry(name string) bool

compresses a file for the current zip entry.

param zip zip archive handler.
param filename input file.

return the return code - 0 on success, negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr


extract_entry(path string) /*?*/bool

extracts the current zip entry into output file.

param zip zip archive handler.
param filename output file.

return the return code - 0 on success, negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr


index() ?int

returns an index of the current zip entry.

param zip zip archive handler.

return the index on success, negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr


isdir() ?bool

determines if the current zip entry is a directory entry.

param zip zip archive handler.

return the return code - 1 (true), 0 (false), negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr


name() string

returns a local name of the current zip entry.

The main difference between user's entry name and local entry name
is optional relative path.
Following .ZIP File Format Specification - the path stored MUST not contain
a drive or device letter, or a leading slash.
All slashes MUST be forward slashes '/' as opposed to backwards slashes '\'
for compatibility with Amiga and UNIX file systems etc.

param zip: zip archive handler.

return the pointer to the current zip entry name, or NULL on error.

Tags: zip

Applies to: zip_ptr


open_entry(name string) /*?*/bool

open_entry opens an entry by name in the zip archive.

For zip archive opened in 'w' or 'a' mode the function will append
a new entry. In readonly mode the function tries to locate the entry
in global dictionary.

param zip zip archive handler.
param entryname an entry name in local dictionary.

return the return code - 0 on success, negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr


open(name string, level int, mode string) ?zip_ptr

opens zip archive with compression level using the given mode.

param zipname zip archive file name.
param level compression level (0-9 are the standard zlib-style levels).
param mode file access mode.
      - 'r': opens a file for reading/extracting (the file must exists).
      - 'w': creates an empty file for writing.
      - 'a': appends to an existing archive.

return the zip archive handler or NULL on error

Tags: zip

Applies to: None


read_entry() ?voidptr

extracts the current zip entry into output buffer.

The function allocates sufficient memory for an output buffer.

param zip zip archive handler.
param buf output buffer.
param bufsize output buffer size (in bytes).

note remember to release the memory allocated for an output buffer.
     for large entries, please take a look at zip_entry_extract function.

return the return code - the number of bytes actually read on success.
       Otherwise a -1 on error.

Tags: zip

Applies to: zip_ptr


size() i64

returns an uncompressed size of the current zip entry.

param zip zip archive handler.

return the uncompressed size in bytes.

Tags: zip

Applies to: zip_ptr


total() ?int

returns the number of all entries (files and directories) in the zip archive.

param zip zip archive handler.

return the return code - the number of entries on success, negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr


write_entry(data []byte) bool

compresses an input buffer for the current zip entry.

param zip zip archive handler.
param buf input buffer.
param bufsize input buffer size (in bytes).

return the return code - 0 on success, negative number (< 0) on error.

Tags: zip

Applies to: zip_ptr

term


bg_black(msg string) string


Tags: term

Applies to: None


bg_blue(msg string) string


Tags: term

Applies to: None


bg_cyan(msg string) string


Tags: term

Applies to: None


bg_green(msg string) string


Tags: term

Applies to: None


bg_hex(hex int, msg string) string


Tags: term

Applies to: None


bg_magenta(msg string) string


Tags: term

Applies to: None


bg_red(msg string) string


Tags: term

Applies to: None


bg_rgb(r, g, b int, msg string) string


Tags: term

Applies to: None


bg_white(msg string) string


Tags: term

Applies to: None


bg_yellow(msg string) string


Tags: term

Applies to: None


black(msg string) string


Tags: term

Applies to: None


blue(msg string) string


Tags: term

Applies to: None


bold(msg string) string


Tags: term

Applies to: None


bright_bg_black(msg string) string


Tags: term

Applies to: None


bright_bg_blue(msg string) string


Tags: term

Applies to: None


bright_bg_cyan(msg string) string


Tags: term

Applies to: None


bright_bg_green(msg string) string


Tags: term

Applies to: None


bright_bg_magenta(msg string) string


Tags: term

Applies to: None


bright_bg_red(msg string) string


Tags: term

Applies to: None


bright_bg_white(msg string) string


Tags: term

Applies to: None


bright_bg_yellow(msg string) string


Tags: term

Applies to: None


bright_black(msg string) string


Tags: term

Applies to: None


bright_blue(msg string) string


Tags: term

Applies to: None


bright_cyan(msg string) string


Tags: term

Applies to: None


bright_green(msg string) string


Tags: term

Applies to: None


bright_magenta(msg string) string


Tags: term

Applies to: None


bright_red(msg string) string


Tags: term

Applies to: None


bright_white(msg string) string


Tags: term

Applies to: None


bright_yellow(msg string) string


Tags: term

Applies to: None


can_show_color_on_stderr() bool

returns true if colors are allowed in stderr;
returns false otherwise.

Tags: term

Applies to: None


can_show_color_on_stdout() bool

returns true if colors are allowed in stdout;
returns false otherwise.

Tags: term

Applies to: None


cursor_back(n int)


Tags: term

Applies to: None


cursor_down(n int)


Tags: term

Applies to: None


cursor_forward(n int)


Tags: term

Applies to: None


cursor_up(n int)


Tags: term

Applies to: None


cyan(msg string) string


Tags: term

Applies to: None


dim(msg string) string


Tags: term

Applies to: None


erase_clear()


Tags: term

Applies to: None


erase_del_clear()


Tags: term

Applies to: None


erase_display(t string)

type: 0 -> current cursor position to end of the screen
type: 1 -> current cursor position to beginning of the screen
type: 2 -> clears entire screen
type: 3 -> clears entire screen and also delete scrollback buffer

Tags: term

Applies to: None


erase_line_clear()


Tags: term

Applies to: None


erase_line_tobeg()


Tags: term

Applies to: None


erase_line_toend()


Tags: term

Applies to: None


erase_line(t string)

type: 0 -> current cursor position to end of the line
type: 1 -> current cursor position to beginning of the line
type: 2 -> clears entire line
Note: Cursor position does not change

Tags: term

Applies to: None


erase_tobeg()


Tags: term

Applies to: None


erase_toend()


Tags: term

Applies to: None


fail_message(s string) string

returns a colored string with red color.
If colors are not allowed, returns a given string.

Tags: term

Applies to: None


format_rgb(r, g, b int, msg, open, close string) string


Tags: term

Applies to: None


format(msg, open, close string) string


Tags: term

Applies to: None


get_terminal_size() (int, int)

returns a number of colums and rows of terminal window.

Tags: term

Applies to: None


get_terminal_size() (int,int)

returns a number of colums and rows of terminal window.

Tags: term

Applies to: None


gray(msg string) string


Tags: term

Applies to: None


green(msg string) string


Tags: term

Applies to: None


h_divider(divider string) string

h_divider returns a horizontal divider line with a dynamic width,
that depends on the current terminal settings.
If an empty string is passed in, print enough spaces to make a new line

Tags: term

Applies to: None


header(text, divider string) string

returns a horizontal divider line with a centered text in the middle.
e.g: term.header('TEXT', '=')
=============== TEXT ===============

Tags: term

Applies to: None


hex(hex int, msg string) string


Tags: term

Applies to: None


hidden(msg string) string


Tags: term

Applies to: None


hide_cursor()

will make cursor invisible

Tags: term

Applies to: None


inverse(msg string) string


Tags: term

Applies to: None


italic(msg string) string


Tags: term

Applies to: None


magenta(msg string) string


Tags: term

Applies to: None


move(n int, direction string)

n is number of cells
direction: A is up / North
direction: B is down / South
direction: C is forward / East
direction: D is backward / West

Tags: term

Applies to: None


ok_message(s string) string

returns a colored string with green color.
If colors are not allowed, returns a given string.

Tags: term

Applies to: None


red(msg string) string


Tags: term

Applies to: None


reset(msg string) string


Tags: term

Applies to: None


rgb(r, g, b int, msg string) string


Tags: term

Applies to: None


set_cursor_position(x int, y int)

Setting cursor to the given position
x is the x coordinate
y is the y coordinate

Tags: term

Applies to: None


show_cursor()

will make cursor appear if not visible

Tags: term

Applies to: None


strikethrough(msg string) string


Tags: term

Applies to: None


underline(msg string) string


Tags: term

Applies to: None


warn_message(s string) string

returns a colored string with yellow color.
If colors are not allowed, returns a given string.

Tags: term

Applies to: None


white(msg string) string


Tags: term

Applies to: None


yellow(msg string) string


Tags: term

Applies to: None

time


add_days(days int) Time

returns a new time struct with an added number of days.

Tags: time

Applies to: Time


add_seconds(seconds int) Time

returns a new time struct with an added number of seconds.

Tags: time

Applies to: Time


clean() string

returns a date string in a following format:
 - a date string in "HH:MM" format (24h) for current day
 - a date string in "MMM D HH:MM" format (24h) for date of current year
 - a date string formatted with format function for other dates

Tags: time

Applies to: Time


clean12() string

returns a date string in a following format:
 - a date string in "HH:MM" format (12h) for current day
 - a date string in "MMM D HH:MM" format (12h) for date of current year
 - a date string formatted with format function for other dates

Tags: time

Applies to: Time


day_of_week() int

returns the current day as an integer.

Tags: time

Applies to: Time


day_of_week(y, m, d int) int

returns the current day of a given year, month, and day, as an integer.

Tags: time

Applies to: None


days_in_month(month, year int) ?int

returns a number of days in a given month.

Tags: time

Applies to: None


ddmmy() string

returns a date string in "DD.MM.YYYY" format.

Tags: time

Applies to: Time


elapsed() Duration

returns the Duration since the last start call

Tags: time

Applies to: StopWatch


format_ss() string

returns a date string in "YYYY-MM-DD HH:MM:SS" format (24h).

Tags: time

Applies to: Time


format() string

returns a date string in "YYYY-MM-DD HH:MM" format (24h).

Tags: time

Applies to: Time


get_fmt_date_str(fmt_dlmtr FormatDelimiter, fmt_date FormatDate) string

returns a date string with specified FormatDelimiter and FormatDate type.

Tags: time

Applies to: Time


get_fmt_str(fmt_dlmtr FormatDelimiter, fmt_time FormatTime, fmt_date FormatDate) string

returns a date string with specified FormatDelimiter, FormatTime type, and FormatDate type.

Tags: time

Applies to: Time


get_fmt_time_str(fmt_time FormatTime) string

returns a date string with specified FormatTime type.

Tags: time

Applies to: Time


hhmm() string

returns a date string in "HH:MM" format (24h).

Tags: time

Applies to: Time


hhmm12() string

returns a date string in "HH:MM" format (12h).

Tags: time

Applies to: Time


hhmmss() string

returns a date string in "HH:MM:SS" format (24h).

Tags: time

Applies to: Time


hours() f64

returns the duration as a floating point number of hours.

Tags: time

Applies to: Duration


is_leap_year(year int) bool

checks if a given a year is a leap year.

Tags: time

Applies to: None


md() string

returns a date string in "MMM D" format.

Tags: time

Applies to: Time


microseconds() i64

returns the duration as an integer number of microseconds.

Tags: time

Applies to: Duration


milliseconds() i64

returns the duration as an integer number of milliseconds.

Tags: time

Applies to: Duration


minutes() f64

returns the duration as a floating point number of minutes.

Tags: time

Applies to: Duration


nanoseconds() i64

returns the duration as an integer number of nanoseconds.

Tags: time

Applies to: Duration


new_stopwatch() StopWatch


Tags: time

Applies to: None


new_time(t Time) Time

returns a time struct with calculated Unix time.

Tags: time

Applies to: None


now() Time

returns current local time.

Tags: time

Applies to: None


parse_rfc2822(s string) ?Time

returns time from a date string in RFC 2822 datetime format.

Tags: time

Applies to: None


parse(s string) ?Time

returns time from a date string in "YYYY-MM-DD HH:MM:SS" format.

Tags: time

Applies to: None


pause()


Tags: time

Applies to: StopWatch


relative() string

returns a string representation of difference between time and current time.

Tags: time

Applies to: Time


restart()


Tags: time

Applies to: StopWatch


seconds() f64

returns the duration as a floating point number of seconds.

Tags: time

Applies to: Duration


sleep_ms(milliseconds int)

makes the calling thread sleep for a given number of milliseconds.

Tags: time

Applies to: None


sleep(seconds int)

makes the calling thread sleep for a given number of seconds.

Tags: time

Applies to: None


smonth() string

returns month name.

Tags: time

Applies to: Time


start()

Starts the timer. If the timer was paused, restarts counting.

Tags: time

Applies to: StopWatch


stop()


Tags: time

Applies to: StopWatch


str() string

returns time in the same format as `parse` expects ("YYYY-MM-DD HH:MM:SS").

Tags: time

Applies to: Time


ticks() i64

returns a number of milliseconds elapsed since system start.

Tags: time

Applies to: None


unix_time() int

returns Unix time.

Tags: time

Applies to: Time


unix(abs int) Time

returns a time struct from Unix time.

Tags: time

Applies to: None


usleep(microseconds int)

makes the calling thread sleep for a given number of microseconds.

Tags: time

Applies to: None


weekday_str() string

returns the current day as a string.

Tags: time

Applies to: Time


ymmdd() string

returns a date string in "YYYY-MM-DD" format.

Tags: time

Applies to: Time

time.misc


random() time.Time

returns a random time struct in *the past*.

Tags: time

Applies to: None

uiold


reg_key_vid()


Tags:

Applies to: None

v.ast


innermost(pos int) ?&Scope

returns the innermost scope containing pos

Tags:

Applies to: &Scope


args2str(args []CallArg) string


Tags:

Applies to: None


expr_is_blank_ident(expr Expr) bool


Tags:

Applies to: None


expr_is_call(expr Expr) bool


Tags:

Applies to: None


find_const(name string) ?&ConstField


Tags:

Applies to: &Scope


find_var(name string) ?&Var


Tags:

Applies to: &Scope


find_with_scope(name string) ?(ScopeObject, &Scope)


Tags:

Applies to: &Scope


find(name string) ?ScopeObject


Tags:

Applies to: &Scope


innermost(pos int) &Scope

returns the innermost scope containing pos

Tags:

Applies to: &Scope


is_known(name string) bool


Tags:

Applies to: &Scope


known_var(name string) bool


Tags:

Applies to: &Scope


new_scope(parent &Scope, start_pos int) &Scope


Tags:

Applies to: None


outermost() &Scope


Tags:

Applies to: &Scope


register(name string, obj ScopeObject)


Tags:

Applies to: Scope


show(depth, max_depth int) string


Tags:

Applies to: &Scope


str() string


Tags:

Applies to: &Scope,CallArg,Expr,Stmt


str(t &table.Table) string


Tags:

Applies to: &FnDecl


update_var_type(name string, typ table.Type)


Tags:

Applies to: Scope


var_info() IdentVar


Tags:

Applies to: &Ident

v.builder


build_c(v_files []string, out_file string)


Tags:

Applies to: Builder


build_js(v_files []string, out_file string)


Tags:

Applies to: Builder


build_x64(v_files []string, out_file string)


Tags:

Applies to: Builder


cc_msvc()


Tags:

Applies to: Builder


compile_c()


Tags:

Applies to: Builder


compile_js()


Tags:

Applies to: Builder


compile_x64()


Tags:

Applies to: Builder


compile(command string, pref &pref.Preferences)


Tags:

Applies to: None


find_module_path(mod, fpath string) ?string


Tags:

Applies to: Builder


gen_c(v_files []string) string


Tags:

Applies to: Builder


gen_js(v_files []string) string


Tags:

Applies to: Builder


get_builtin_files() []string


Tags:

Applies to: Builder


get_user_files() []string


Tags:

Applies to: Builder


import_graph() &depgraph.DepGraph

graph of all imported modules

Tags:

Applies to: &Builder


info(s string)


Tags:

Applies to: Builder


log(s string)


Tags:

Applies to: Builder


new_builder(pref &pref.Preferences) Builder


Tags:

Applies to: None


parse_imports()

parse all deps from already parsed files

Tags:

Applies to: Builder


resolve_deps()


Tags:

Applies to: Builder


v_files_from_dir(dir string) []string


Tags:

Applies to: Builder

v.cflag


format() string

format flag

Tags:

Applies to: &CFlag


str() string


Tags:

Applies to: &CFlag

v.checker


array_init(array_init mut ast.ArrayInit) table.Type


Tags:

Applies to: Checker


assign_stmt(assign_stmt mut ast.AssignStmt)


Tags:

Applies to: Checker


call_expr(call_expr mut ast.CallExpr) table.Type


Tags:

Applies to: Checker


call_fn(call_expr mut ast.CallExpr) table.Type


Tags:

Applies to: Checker


call_method(call_expr mut ast.CallExpr) table.Type


Tags:

Applies to: Checker


check_expr_opt_call(x ast.Expr, xtype table.Type, is_return_used bool)


Tags:

Applies to: Checker


check_files(ast_files []ast.File)


Tags:

Applies to: Checker


check_or_block(call_expr mut ast.CallExpr, ret_type table.Type, is_ret_used bool)


Tags:

Applies to: Checker


check(ast_file ast.File)


Tags:

Applies to: Checker


check2(ast_file ast.File) []errors.Error


Tags:

Applies to: Checker


enum_decl(decl ast.EnumDecl)


Tags:

Applies to: Checker


enum_val(node mut ast.EnumVal) table.Type


Tags:

Applies to: Checker


error(message string, pos token.Position)


Tags:

Applies to: Checker


expr(node ast.Expr) table.Type


Tags:

Applies to: Checker


ident(ident mut ast.Ident) table.Type


Tags:

Applies to: Checker


if_expr(node mut ast.IfExpr) table.Type


Tags:

Applies to: Checker


index_expr(node mut ast.IndexExpr) table.Type


Tags:

Applies to: Checker


infix_expr(infix_expr mut ast.InfixExpr) table.Type


Tags:

Applies to: Checker


is_last_or_block_stmt_valid(stmt ast.Stmt) bool

TODO: merge to check_or_block when v can handle it

Tags:

Applies to: Checker


map_init(node mut ast.MapInit) table.Type


Tags:

Applies to: Checker


match_expr(node mut ast.MatchExpr) table.Type


Tags:

Applies to: Checker


new_checker(table &table.Table, pref &pref.Preferences) Checker


Tags:

Applies to: None


postfix_expr(node ast.PostfixExpr) table.Type


Tags:

Applies to: Checker


return_stmt(return_stmt mut ast.Return)


Tags:

Applies to: Checker


selector_expr(selector_expr mut ast.SelectorExpr) table.Type


Tags:

Applies to: Checker


struct_decl(decl ast.StructDecl)


Tags:

Applies to: Checker


struct_init(struct_init mut ast.StructInit) table.Type


Tags:

Applies to: Checker


type_decl(node ast.TypeDecl)


Tags:

Applies to: Checker


warn(s string, pos token.Position)


Tags:

Applies to: Checker

v.checker.tests


main()


Tags:

Applies to: None


my_fn() int


Tags:

Applies to: None

v.depgraph


add(mod string, deps []string)


Tags:

Applies to: DepGraph


add(name string, deps []string)


Tags:

Applies to: OrderedDepMap


apply_diff(name string, deps []string)


Tags:

Applies to: OrderedDepMap


delete(name string)


Tags:

Applies to: OrderedDepMap


display_cycles() string


Tags:

Applies to: &DepGraph


display() string


Tags:

Applies to: &DepGraph


get(name string) []string


Tags:

Applies to: &OrderedDepMap


last_node() DepGraphNode


Tags:

Applies to: &DepGraph


new_dep_graph() &DepGraph


Tags:

Applies to: None


resolve() &DepGraph


Tags:

Applies to: &DepGraph


set(name string, deps []string)


Tags:

Applies to: OrderedDepMap


size() int


Tags:

Applies to: &OrderedDepMap

v.doc


doc(mod string, table &table.Table) string


Tags:

Applies to: None

v.eval


eval(file ast.File, table &table.Table) string


Tags:

Applies to: Eval


str() string


Tags:

Applies to: Object

v.fmt


fmt(file ast.File, table &table.Table) string


Tags:

Applies to: None


write(s string)


Tags:

Applies to: Fmt


writeln(s string)


Tags:

Applies to: Fmt

v.fmt.tests


foo() bool


Tags:

Applies to: MyStruct


test() ?&SomeType


Tags:

Applies to: None

v.gen


base_typ(t table.Type) string


Tags:

Applies to: Gen


cgen(files []ast.File, table &table.Table, pref &pref.Preferences) string


Tags:

Applies to: None


finish()


Tags:

Applies to: Gen


gen_vprint_profile_stats()


Tags:

Applies to: Gen


hashes() string


Tags:

Applies to: Gen


init()


Tags:

Applies to: Gen


new_tmp_var() string


Tags:

Applies to: Gen


reset_tmp_count()


Tags:

Applies to: Gen


save()


Tags:

Applies to: Gen


typ(t table.Type) string

V type to C type

Tags:

Applies to: Gen


write_multi_return_types()


Tags:

Applies to: Gen


write_tests_main()


Tags:

Applies to: Gen


write_typedef_types()


Tags:

Applies to: Gen


write_typeof_functions()


Tags:

Applies to: Gen


write_variadic_types()


Tags:

Applies to: Gen


write(s string)


Tags:

Applies to: Gen


writeln(s string)


Tags:

Applies to: Gen

v.gen.js


dec_indent()


Tags:

Applies to: JsGen


enter_namespace(n string)


Tags:

Applies to: JsGen


escape_namespace()


Tags:

Applies to: JsGen


find_class_methods(stmts []ast.Stmt)


Tags:

Applies to: JsGen


finish()


Tags:

Applies to: JsGen


gen_indent()


Tags:

Applies to: JsGen


gen(files []ast.File, table &table.Table, pref &pref.Preferences) string


Tags:

Applies to: None


hashes() string


Tags:

Applies to: JsGen


inc_indent()


Tags:

Applies to: JsGen


init()


Tags:

Applies to: JsGen


new_tmp_var() string


Tags:

Applies to: JsGen


push_pub_var(s string)


Tags:

Applies to: JsGen


save()


Tags:

Applies to: &JsGen


typ(t table.Type) string

V type to JS type

Tags:

Applies to: JsGen


write(s string)


Tags:

Applies to: JsGen


writeln(s string)


Tags:

Applies to: JsGen

v.gen.x64


add(reg Register, val int)


Tags:

Applies to: Gen


call_fn(node ast.CallExpr)


Tags:

Applies to: Gen


gen_exit()


Tags:

Applies to: Gen


gen_loop_end(to, label int)


Tags:

Applies to: Gen


gen_loop_start(from int) int


Tags:

Applies to: Gen


gen_print_from_expr(expr ast.Expr, newline bool)


Tags:

Applies to: Gen


gen_print(s string)


Tags:

Applies to: Gen


gen(files []ast.File, out_name string)


Tags:

Applies to: None


generate_elf_footer()


Tags:

Applies to: Gen


generate_elf_header()


Tags:

Applies to: Gen


new_gen(out_name string) &Gen


Tags:

Applies to: None


pop(reg Register)


Tags:

Applies to: Gen


pos() i64


Tags:

Applies to: &Gen


push(reg Register)


Tags:

Applies to: Gen


register_function_address(name string)


Tags:

Applies to: Gen


ret()


Tags:

Applies to: Gen


save_main_fn_addr()


Tags:

Applies to: Gen


stmts(stmts []ast.Stmt)


Tags:

Applies to: Gen


sub32(reg Register, val int)


Tags:

Applies to: Gen

v.gen/tests/localmod


get_int_10() int


Tags:

Applies to: None


pub_foo()


Tags:

Applies to: None

v.parser


assign_expr(left ast.Expr) ast.AssignExpr


Tags:

Applies to: Parser


call_args() []ast.CallArg


Tags:

Applies to: Parser


call_expr(is_c, is_js bool, mod string) ast.CallExpr


Tags:

Applies to: Parser


check_comment() ast.Comment


Tags:

Applies to: Parser


close_scope()


Tags:

Applies to: Parser


comment() ast.Comment


Tags:

Applies to: Parser


error_with_pos(s string, pos token.Position)


Tags:

Applies to: &Parser


error(s string)


Tags:

Applies to: &Parser


expr(precedence int) ast.Expr


Tags:

Applies to: Parser


init_parse_fns()


Tags:

Applies to: &Parser


known_import(mod string) bool

return true if file being parsed imports `mod`

Tags:

Applies to: &Parser


name_expr() ast.Expr


Tags:

Applies to: Parser


open_scope()


Tags:

Applies to: Parser


parse_any_type(is_c, is_js, is_ptr bool) table.Type


Tags:

Applies to: Parser


parse_array_type() table.Type


Tags:

Applies to: Parser


parse_block_no_scope() []ast.Stmt


Tags:

Applies to: Parser


parse_block() []ast.Stmt


Tags:

Applies to: Parser


parse_file(path string, table &table.Table, comments_mode scanner.CommentsMode, pref &pref.Preferences, global_scope &ast.Scope) ast.File


Tags:

Applies to: None


parse_files(paths []string, table &table.Table, pref &pref.Preferences, global_scope &ast.Scope) []ast.File


Tags:

Applies to: None


parse_fn_type(name string) table.Type

given anon name based off signature when `name` is blank

Tags:

Applies to: Parser


parse_ident(is_c, is_js bool) ast.Ident


Tags:

Applies to: Parser


parse_map_type() table.Type


Tags:

Applies to: Parser


parse_multi_return_type() table.Type


Tags:

Applies to: Parser


parse_stmt(text string, table &table.Table, scope &ast.Scope) ast.Stmt


Tags:

Applies to: None


parse_type_with_mut(is_mut bool) table.Type


Tags:

Applies to: Parser


parse_type() table.Type


Tags:

Applies to: Parser


read_first_token()


Tags:

Applies to: Parser


stmt() ast.Stmt


Tags:

Applies to: Parser


top_stmt() ast.Stmt


Tags:

Applies to: Parser


warn_with_pos(s string, pos token.Position)


Tags:

Applies to: &Parser


warn(s string)


Tags:

Applies to: &Parser

v.pref


backend_from_string(s string) ?Backend


Tags:

Applies to: None


fill_with_defaults()


Tags:

Applies to: Preferences


get_host_os() OS


Tags:

Applies to: None


new_preferences() Preferences


Tags:

Applies to: None


os_from_string(os_str string) ?OS

Helper function to convert string names to OS enum

Tags:

Applies to: None


str() string


Tags:

Applies to: OS


vexe_path() string


Tags:

Applies to: None

v.scanner


add_fn_main_and_rescan()


Tags:

Applies to: &Scanner


error(msg string)


Tags:

Applies to: &Scanner


new_scanner_file(file_path string, comments_mode CommentsMode) &Scanner

new scanner from file.

Tags:

Applies to: None


new_scanner(text string, comments_mode CommentsMode) &Scanner

new scanner from string.

Tags:

Applies to: None


scan() token.Token


Tags:

Applies to: Scanner


verror(s string)


Tags:

Applies to: None

v.table


add_placeholder_type(name string) int


Tags:

Applies to: Table


array_fixed_info() ArrayFixed


Tags:

Applies to: &TypeSymbol


array_fixed_name(elem_type Type, size, nr_dims int) string


Tags:

Applies to: &Table


array_info() Array


Tags:

Applies to: &TypeSymbol


array_name(elem_type Type, nr_dims int) string


Tags:

Applies to: &Table


check(got, expected Type) bool


Tags:

Applies to: &Table


contains(typ Type) bool


Tags:

Applies to: []Type


deref() Type

decrement nr_muls on `t` and return it

Tags:

Applies to: Type


enum_info() Enum


Tags:

Applies to: &TypeSymbol


find_field(name string) ?Field


Tags:

Applies to: &TypeSymbol,Struct


find_fn(name string) ?Fn


Tags:

Applies to: &Table


find_method(name string) ?Fn


Tags:

Applies to: &TypeSymbol


find_or_register_array_fixed(elem_type Type, size, nr_dims int) int


Tags:

Applies to: Table


find_or_register_array(elem_type Type, nr_dims int) int


Tags:

Applies to: Table


find_or_register_fn_type(f Fn, is_anon, has_decl bool) int


Tags:

Applies to: Table


find_or_register_map(key_type, value_type Type) int


Tags:

Applies to: Table


find_or_register_multi_return(mr_typs []Type) int


Tags:

Applies to: Table


find_type_idx(name string) int


Tags:

Applies to: &Table


find_type(name string) ?TypeSymbol


Tags:

Applies to: &Table


flag_is(flag TypeFlag) bool

return true if the flag set on `t` is `flag`

Tags:

Applies to: Type


flag() TypeFlag

return the flag that is set on `t`

Tags:

Applies to: Type


get_field(name string) Field


Tags:

Applies to: Struct


get_type_name(typ Type) string


Tags:

Applies to: &Table


get_type_symbol(typ Type) &TypeSymbol


Tags:

Applies to: &Table


has_field(name string) bool


Tags:

Applies to: &TypeSymbol


has_method(name string) bool


Tags:

Applies to: &TypeSymbol


idx() int

return TypeSymbol idx for `t`

Tags:

Applies to: Type


is_float() bool


Tags:

Applies to: &TypeSymbol,Type


is_int() bool


Tags:

Applies to: &TypeSymbol,Type


is_number() bool


Tags:

Applies to: &TypeSymbol,Type


is_pointer() bool


Tags:

Applies to: &TypeSymbol


is_ptr() bool

return true if `t` is a pointer (nr_muls>0)

Tags:

Applies to: Type


known_fn(name string) bool


Tags:

Applies to: &Table


known_type(name string) bool


Tags:

Applies to: &Table


map_info() Map


Tags:

Applies to: &TypeSymbol


map_name(key_type, value_type Type) string


Tags:

Applies to: &Table


mr_info() MultiReturn


Tags:

Applies to: &TypeSymbol


new_table() &Table


Tags:

Applies to: None


new_type_ptr(idx, nr_muls int) Type

return new type with TypeSymbol idx set to `idx` & nr_muls set to `nr_muls`

Tags:

Applies to: None


new_type(idx int) Type

return new type with TypeSymbol idx set to `idx`

Tags:

Applies to: None


nr_muls() int

return nr_muls for `t`

Tags:

Applies to: Type


parse_cflag(cflg, mod string, ctimedefines []string) ?bool

parse the flags to (table.cflags) []CFlag
Note: clean up big time (joe-c)

Tags:

Applies to: Table


qualify_module(mod, file_path string) string

Once we have a module format we can read from module file instead
this is not optimal

Tags:

Applies to: &Table


register_builtin_type_symbol(typ TypeSymbol) int


Tags:

Applies to: Table


register_builtin_type_symbols()

this will override or register builtin type
allows prexisitng types added in register_builtins
to be overriden with their real type info

Tags:

Applies to: Table


register_fn(new_fn Fn)


Tags:

Applies to: Table


register_method(new_fn Fn)


Tags:

Applies to: TypeSymbol


register_type_symbol(typ TypeSymbol) int


Tags:

Applies to: Table


set_flag(flag TypeFlag) Type

set the flag on `t` to `flag` and return it

Tags:

Applies to: Type


set_nr_muls(nr_muls int) Type

set nr_muls on `t` and return it

Tags:

Applies to: Type


signature() string

used to compare fn's & for naming anon fn's

Tags:

Applies to: &Fn


str() string


Tags:

Applies to: &TypeSymbol,Kind,TypeSymbol,[]Kind


struct_find_field(s &TypeSymbol, name string) ?Field

search from current type up through each parent looking for field

Tags:

Applies to: &Table


struct_has_field(s &TypeSymbol, name string) bool


Tags:

Applies to: &Table


struct_info() Struct


Tags:

Applies to: &TypeSymbol


to_ptr() Type

increments nr_nuls on `t` and return it

Tags:

Applies to: Type


type_find_method(s &TypeSymbol, name string) ?Fn

search from current type up through each parent looking for method

Tags:

Applies to: &Table


type_has_method(s &TypeSymbol, name string) bool


Tags:

Applies to: &Table


type_to_str(t Type) string


Tags:

Applies to: &Table


value_type(typ Type) Type


Tags:

Applies to: &Table

v.tests


str() string


Tags:

Applies to: Color,EmptyStruct,Foo,Human,MySumType,Person,Vec


test_pub_fn_attribute()


Tags:

Applies to: None

v.tests.local


local_fn() bool


Tags:

Applies to: None

v.tests.modules.amodule


iadd(x int, y int) int


Tags:

Applies to: None


imul(x int, y int) int


Tags:

Applies to: None

v.tests.modules.simplemodule


iadd(x int, y int) int


Tags:

Applies to: None


imul(x int, y int) int


Tags:

Applies to: None

v.tests.project_with_c_code


vadd(a int, b int) int


Tags:

Applies to: None

v.tests.project_with_modules_having_submodules.mod1


f() int


Tags:

Applies to: None

v.tests.project_with_modules_having_submodules.mod1.mod11


f() int


Tags:

Applies to: None

v.tests.project_with_modules_having_submodules.mod1.mod12


f() int


Tags:

Applies to: None

v.tests.project_with_modules_having_submodules.mod1.mod13


f() int


Tags:

Applies to: None

v.tests.project_with_modules_having_submodules.mod1.mod14


f() int


Tags:

Applies to: None

v.tests.project_with_modules_having_submodules.mod1.submodule


f() int


Tags:

Applies to: None

v.tests.repl.runner


full_path_to_v(dirs_in int) string


Tags:

Applies to: None


new_options() RunnerOptions


Tags:

Applies to: None


new_prod_options() RunnerOptions


Tags:

Applies to: None


run_prod_file(wd string, vexec string, file string) ?string


Tags:

Applies to: None


run_repl_file(wd string, vexec string, file string) ?string


Tags:

Applies to: None

v.token


build_precedences() []Precedence


Tags:

Applies to: None


extend(end Position) Position


Tags:

Applies to: Position


is_assign() bool


Tags:

Applies to: Kind


is_decl(t Kind) bool


Tags:

Applies to: None


is_infix() bool


Tags:

Applies to: Kind


is_key(key string) bool


Tags:

Applies to: None


is_relational() bool


Tags:

Applies to: Kind


is_scalar() bool

returns true if the token is a scalar

Tags:

Applies to: Token


is_start_of_type() bool


Tags:

Applies to: Kind


is_unary() bool

returns true if the token can be in a unary expression

Tags:

Applies to: Token


key_to_token(key string) Kind


Tags:

Applies to: None


position() Position


Tags:

Applies to: &Token


precedence() int

returns a tokens precedence if defined, otherwise lowest_prec

Tags:

Applies to: Token


str() string


Tags:

Applies to: Kind,Position,Token

v.util


cescaped_path(s string) string


Tags:

Applies to: None


color_compare_files(diff_cmd, file1, file2 string) string


Tags:

Applies to: None


find_working_diff_command() ?string


Tags:

Applies to: None


formatted_error(kind, emsg, filepath string, pos token.Position) string


Tags:

Applies to: None


full_hash() string


Tags:

Applies to: None


full_v_version() string

returns the full version of the V compiler

Tags:

Applies to: None


githash(should_get_from_filesystem bool) string

returns the current git commit hash.
When x is false, it is very fast - it just returns a predefined C constant.
When x is true, it tries to get the current commit hash, by parsing the
relevant files in the .git/ folder, or if that is not possible
for example when using a V from a V binary release, that does not have .git/
defaults to getting the predefined C constant again.
NB: githash(true) must be called only when v detects that it builds itself.
For all other programs, githash(false) should be used.

Tags:

Applies to: None


is_fmt() bool


Tags:

Applies to: None


join_env_vflags_and_os_args() []string


Tags:

Applies to: None


launch_tool(is_verbose bool, tool_name string)


Tags:

Applies to: None


new_error_manager() &EManager


Tags:

Applies to: None


path_of_executable(path string) string


Tags:

Applies to: None


read_file(file_path string) ?string


Tags:

Applies to: None


set_support_color(b bool)


Tags:

Applies to: &EManager


source_context(source string, column int, pos token.Position) []string


Tags:

Applies to: None


verror(kind, s string)


Tags:

Applies to: None


vhash() string

returns the build string C.V_COMMIT_HASH . See cmd/tools/gen_vc.v

Tags:

Applies to: None

v.vmod


dump()


Tags:

Applies to: &ModFileCacher


get(mfolder string) ModFileAndFolder


Tags:

Applies to: ModFileCacher


new_mod_file_cacher() &ModFileCacher


Tags:

Applies to: None

vweb


run<T>(app mut T, port int)


Tags: vweb

Applies to: None


add_header(key, val string)


Tags: vweb

Applies to: Context


foo<T>()


Tags: vweb

Applies to: None


get_cookie(key string) ?string


Tags: vweb

Applies to: &Context


get_header(key string) string


Tags: vweb

Applies to: &Context


handle_static(directory_path string) bool


Tags: vweb

Applies to: Context


html(s string)


Tags: vweb

Applies to: Context


index()


Tags: vweb

Applies to: App


json(s string)


Tags: vweb

Applies to: Context


not_found(s string)


Tags: vweb

Applies to: Context


post()


Tags: vweb

Applies to: App


redirect(url string)


Tags: vweb

Applies to: Context


run<T>(port int)


Tags: vweb

Applies to: None


serve_static(url, file_path, mime_type string)


Tags: vweb

Applies to: Context


set_cookie(key, val string)


Tags: vweb

Applies to: Context


text(s string)


Tags: vweb

Applies to: Context

vweb.assets


add_css(file string) bool

adds a css asset

Tags: vweb

Applies to: AssetManager


add_js(file string) bool

adds a js asset

Tags: vweb

Applies to: AssetManager


add(asset_type, file string) ?bool

dont return option until size limit is removed

Tags: vweb

Applies to: AssetManager


combine_css(to_file bool) string

returns the combined css as a string when to_file is false
when to_file is true it combines the css to disk and returns the path of the file

Tags: vweb

Applies to: AssetManager


combine_js(to_file bool) string

returns the combined js as a string when to_file is false
when to_file is true it combines the css to disk and returns the path of the file

Tags: vweb

Applies to: AssetManager


include_css(combine bool) string

returns the html <link> tag(s) for including the css files in a page.
when combine is true the files are combined.

Tags: vweb

Applies to: AssetManager


include_js(combine bool) string

returns the html <script> tag(s) for including the js files in a page.
when combine is true the files are combined.

Tags: vweb

Applies to: AssetManager


minify_css(css string) string


Tags: vweb

Applies to: None


minify_js(js string) string


Tags: vweb

Applies to: None


new_manager() &AssetManager

returns a new AssetManager. An AssetManager combines and caches javascript & css.

Tags: vweb

Applies to: None

vweb.tmpl


compile_template(path string) string


Tags: vweb

Applies to: None