diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-12 23:57:32 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-12 23:57:32 +0100 |
| commit | dd22e1ab7ab7b5bac841dae2b62bfa200b36c4d8 (patch) | |
| tree | 900781940d2ed92df1d87cc7dd6209853492e07f /lib/nes/common/containers/string-builder.cc | |
| parent | 0de4957a22dd408793d0526351bcb7d61786fe86 (diff) | |
add encryption/decryption
Diffstat (limited to 'lib/nes/common/containers/string-builder.cc')
| -rw-r--r-- | lib/nes/common/containers/string-builder.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/nes/common/containers/string-builder.cc b/lib/nes/common/containers/string-builder.cc index ad2f97f..8182955 100644 --- a/lib/nes/common/containers/string-builder.cc +++ b/lib/nes/common/containers/string-builder.cc @@ -253,4 +253,17 @@ namespace nes return status::error_invalid_format_string; } + + auto string_builder::remove_last() -> status + { + if (length_ == 0) { return status::error_buffer_overflow; } + + length_ -= 1; + return status::success; + } + + auto string_builder::clear() -> void + { + length_ = 0; + } } // namespace nes
\ No newline at end of file |
