V's predeclared functions and types (including strings, arrays, maps)


Encoding and decoding of base64 as defined in RFC 4648
Hardware accelerated Graphics library using OpenGL (DirectX, Vulkan, Metal support soon)
OpenGL wrapper
Constants and helpers for drawing
Encoding and decoding of JSON as defined in RFC 7159
Basic constants and mathematical functions
Platform-independent interface to operating system functionality
Measuring and displaying time
Cross-platform UI library



This is a very early version of vlib. Many of the types and function signatures are going to change.

Generated with vdoc. Not sorted alphabetically yet.
fn read_file(path string) string

`read_file` reads the file in `path` and returns the contents.
TODO return `?string`

fn file_size(path string) int

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

fn read_lines(path string) []string

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

fn open(path string) File
fn create(path string) File

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

fn open_append(path string) File
fn system2(cmd string) int

`system2` starts the specified command, waits for it to complete, and returns its code.

fn system(cmd string) string

`system` starts the specified command, waits for it to complete, and returns its output.
TODO merge the two functions.

fn getenv(key string) string

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

fn file_exists(path string) bool

`file_exists` returns true if `path` exists.

fn mkdir(path string)

`mkdir` creates a new directory with the specified path.

fn rm(path string)

`rm` removes file in `path`.

fn unzip(path, out string)
fn basedir(path string) string
fn filename(path string) string
fn home_dir() string

`home_dir` returns path to user's home directory.