We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a126191 commit fe309e3Copy full SHA for fe309e3
CHANGELOG.md
@@ -3,6 +3,7 @@
3
## v0.2.0 - 2021-11-23
4
5
- Converted from rebar3 to the Gleam build tool.
6
+- The `erlang` module gains the `start_arguments` function.
7
8
## v0.1.0 - 2021-09-11
9
src/gleam/erlang.gleam
@@ -90,3 +90,14 @@ pub type Crash {
90
Thrown(Dynamic)
91
Errored(Dynamic)
92
}
93
+
94
+external fn get_start_arguments() -> List(Charlist) =
95
+ "init" "get_plain_arguments"
96
97
+/// Get the arguments given to the program when it was started.
98
+///
99
+/// This is sometimes called `argv` in other languages.
100
+pub fn start_arguments() -> List(String) {
101
+ get_start_arguments()
102
+ |> list.map(charlist.to_string)
103
+}
0 commit comments