Data and Math

vstringconsts

String constants, and simple templates for filling in text.

Released v1.0.0 · 2026-09-28
Import
use "stdlib/stringconsts.ven"

A small set of ready made string constants, such as the digits and the alphabet, with simple templates that expand $name placeholders from a map.

vstringconsts.ven
print ascii_lowercase()
Reference (12 functions)

API reference

ascii_lowercase()

ascii_lowercase()

ascii_uppercase()

ascii_uppercase()

ascii_letters()

ascii_letters()

digits()

digits()

hexdigits()

Gives back every valid hexadecimal digit character.

hexdigits()

octdigits()

octdigits()

punctuation()

Gives back every ASCII punctuation character.

punctuation()

whitespace()

Gives back every character string.whitespace treats as whitespace.

whitespace()

printable()

Gives back every printable ASCII character: digits, letters, punctuation, and whitespace.

printable()

capwords(s, sep = nothing)

Capitalizes each word in s and rejoins them.

capwords("  hello   world  ")

template_substitute(s, mapping)

Expands every $name/${name} placeholder in s, raising on an unresolved one.

m = new_map()
map_set(m, "name", "Ada")
map_set(m, "age", 36)
template_substitute("Hi $name, you are $age.", m)

template_safe_substitute(s, mapping)

Like template_substitute, but leaves an unresolved placeholder untouched instead of raising.

m = new_map()
map_set(m, "name", "Ada")
template_safe_substitute("Hi $name, missing $nope here.", m)

Get notified when vstringconsts changes

Get notified about

New versions and security advisories.

New and updated packages, once a day.

News on the math model built in Venutian.