From d883adaf5cf6fa9906658206df5b0b7487575d87 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Mon, 10 Jul 2023 18:55:20 -0400 Subject: [PATCH] Change toString() to str() to better replicate the std --- include/blt/std/string.h | 2 +- src/blt/std/string.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/blt/std/string.h b/include/blt/std/string.h index 2611f5b..4051c56 100755 --- a/include/blt/std/string.h +++ b/include/blt/std/string.h @@ -26,7 +26,7 @@ namespace blt::string { void expand(); public: void trim(); - std::string toString(); + std::string str(); StringBuffer(){ characterBuffer = static_cast(malloc(BLOCK_SIZE)); diff --git a/src/blt/std/string.cpp b/src/blt/std/string.cpp index 0dba300..2ce5dd7 100755 --- a/src/blt/std/string.cpp +++ b/src/blt/std/string.cpp @@ -23,7 +23,7 @@ blt::string::StringBuffer& blt::string::StringBuffer::operator<<(char c) { return *this; } -std::string blt::string::StringBuffer::toString() { +std::string blt::string::StringBuffer::str() { trim(); return std::string{characterBuffer}; }