aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-getenv.3
blob: 71f828eb306cdd3ba7e3de31ebfd1930d1ecaa00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH getenv 3 2025-11-29 "Tomo man-pages"
.SH NAME
getenv \- get an environment variable
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI getenv\ :\ func(name:\ Text\ ->\ Text?)
.fi
.SH DESCRIPTION
Gets an environment variable.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx
l l l.
Name	Type	Description
name	Text	The name of the environment variable to get. 
.TE
.SH RETURN
If set, the environment variable's value, otherwise, `none`.

.SH EXAMPLES
.EX
assert getenv("TERM") == "xterm-256color"
assert getenv("not_a_variable") == none
.EE