aboutsummaryrefslogtreecommitdiff
path: root/src/string_mutable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_mutable.zig')
-rw-r--r--src/string_mutable.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_mutable.zig b/src/string_mutable.zig
index 7f81b5a74..9fdc3d090 100644
--- a/src/string_mutable.zig
+++ b/src/string_mutable.zig
@@ -25,6 +25,10 @@ pub const MutableString = struct {
};
}
+ pub fn isEmpty(this: *const MutableString) bool {
+ return this.list.items.len == 0;
+ }
+
pub fn deinit(str: *MutableString) void {
if (str.list.capacity > 0) {
str.list.expandToCapacity();