From b411178aae9a1388563ed138adec738af855f803 Mon Sep 17 00:00:00 2001 From: Ecte Date: Sat, 9 Mar 2024 19:44:59 +1030 Subject: [PATCH] added standard c++ method c_str to opp::string that calls cstr method. This should help Intellisense while allowing code that still uses the cstr method to work. --- include/opp/string.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/opp/string.cpp b/include/opp/string.cpp index 0b4da19..86308ce 100644 --- a/include/opp/string.cpp +++ b/include/opp/string.cpp @@ -229,6 +229,10 @@ string & string::operator+=(char c) return *this; } +inline const char * string::c_str(void) const +{ + return this->tocstr(); +} inline const char * string::tocstr(void) const {