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.
new
1 parent 959115c commit 7288ed1Copy full SHA for 7288ed1
src/gleam/bit_builder.gleam
@@ -28,6 +28,13 @@ if javascript {
28
}
29
30
31
+/// Create an empty `BitBuilder`. Useful as the start of a pipe chaning many
32
+/// builders together.
33
+///
34
+pub fn new () -> BitBuilder {
35
+ do_concat([])
36
+}
37
+
38
/// Prepends a bit string to the start of a builder.
39
///
40
/// Runs in constant time.
src/gleam/string_builder.gleam
@@ -14,6 +14,13 @@
14
15
pub external type StringBuilder
16
17
+/// Create an empty `StringBuilder`. Useful as the start of a pipe chaning many
18
19
20
+pub fn new() -> StringBuilder {
21
+ do_from_strings([])
22
23
24
/// Prepends a `String` onto the start of some `StringBuilder`.
25
26
0 commit comments