Tea — a strongly typed scripting languageCompiles native via LLVM
Tea
DocsPlaygroundExamplesReferenceCommunity
GitHub

Tea Language

A strongly typed scripting language for native tools.

© 2026 Tea Language.

ContributingCommunityRepository

Language Runtime

Built-ins

Standard Library

std.argsstd.assertstd.audiostd.encodingstd.envstd.fsstd.hashstd.httpstd.netstd.jsonstd.mathstd.parsestd.pathstd.processstd.randomstd.regexstd.stringstd.timestd.url

Standard Library

std.encoding

Binary-to-text encodings: base64, URL-safe base64, and hex.

Exported functions

pub def base64_encode(data: List[Int]) -> String

Encode bytes as standard base64 text.

pub def base64_encode_text(text: String) -> String

Encode UTF-8 text as standard base64 text.

pub def try_base64_decode(text: String) -> List[Int] ! EncodingError

Decode standard base64 text into bytes, throwing on invalid input.

pub def base64_decode(text: String) -> List[Int]

Decode standard base64 text into bytes, panicking on invalid input.

pub def base64url_encode(data: List[Int]) -> String

Encode bytes as URL-safe base64 text without padding.

pub def base64url_encode_text(text: String) -> String

Encode UTF-8 text as URL-safe base64 text without padding.

pub def try_base64url_decode(text: String) -> List[Int] ! EncodingError

Decode URL-safe base64 text into bytes, throwing on invalid input.

pub def base64url_decode(text: String) -> List[Int]

Decode URL-safe base64 text into bytes, panicking on invalid input.

pub def hex_encode(data: List[Int]) -> String

Encode bytes as lowercase hexadecimal text.

pub def hex_encode_text(text: String) -> String

Encode UTF-8 text as lowercase hexadecimal text.

pub def try_hex_decode(text: String) -> List[Int] ! EncodingError

Decode hexadecimal text into bytes, throwing on invalid input.

pub def hex_decode(text: String) -> List[Int]

Decode hexadecimal text into bytes, panicking on invalid input.