AetherlangLib: Convert

Provides functions for conversions of basic types.


char2int ch @-> number
@ where ch: string of length 1
@ returns numerical representation of CH.

int2char i @-> string
@ where i: number
@ returns a character with I being its numerical representation. I should be an integer.

num2int n @-> number
@ where n: number
@ truncates any number to an integer which is still a number in Aetherlang's type system.

string arg @-> string
@ where arg: any
@ provides conversion of values to string using built-in julia function. avoid it if possible for now.

str2num str @-> number
@ where str: string
@ can be used to parse numbers (both integer and real) from strings. however, you should prefer do.

str2sym str @-> symbol
@ where str: string
@ converts STR into a symbol (without quotation marks).
@ example:
@ eq? (str2sym "exp") :exp @-> 1