|  | @@ -9,14 +9,56 @@
 | 
											
												
													
														|  |  #include "core/utils/Utility.hpp"
 |  |  #include "core/utils/Utility.hpp"
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  namespace Core {
 |  |  namespace Core {
 | 
											
												
													
														|  | -    template<typename T>
 |  | 
 | 
											
												
													
														|  | -    constexpr int stringLength(const T* c) {
 |  | 
 | 
											
												
													
														|  | -        const T* i = c + 1;
 |  | 
 | 
											
												
													
														|  | -        while(*(c++) != '\0') {}
 |  | 
 | 
											
												
													
														|  | -        return static_cast<int>(c - i);
 |  | 
 | 
											
												
													
														|  | 
 |  | +    namespace Internal {
 | 
											
												
													
														|  | 
 |  | +        template<typename String, typename T>
 | 
											
												
													
														|  | 
 |  | +        CError genericAppend(String& s, const T& t) {
 | 
											
												
													
														|  | 
 |  | +            if constexpr(requires { t.toString(s); }) {
 | 
											
												
													
														|  | 
 |  | +                return t.toString(s);
 | 
											
												
													
														|  | 
 |  | +            } else {
 | 
											
												
													
														|  | 
 |  | +                char buffer[64];
 | 
											
												
													
														|  | 
 |  | +                CORE_RETURN_ERROR(toString(t, buffer, CORE_SIZE(buffer)));
 | 
											
												
													
														|  | 
 |  | +                return s.append(static_cast<const char*>(buffer));
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        template<typename S, typename T, typename... Args>
 | 
											
												
													
														|  | 
 |  | +        CError formatR(const S& f, S& s, int index, const T& t,
 | 
											
												
													
														|  | 
 |  | +                       Args&&... args) {
 | 
											
												
													
														|  | 
 |  | +            i32 l = f.getLength();
 | 
											
												
													
														|  | 
 |  | +            while(index < l) {
 | 
											
												
													
														|  | 
 |  | +                auto u = f[index++];
 | 
											
												
													
														|  | 
 |  | +                if(u == '#') {
 | 
											
												
													
														|  | 
 |  | +                    if(index >= l || f[index] != '#') {
 | 
											
												
													
														|  | 
 |  | +                        break;
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  | 
 |  | +                    index++;
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +                CORE_RETURN_ERROR(s.append(u));
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            CORE_RETURN_ERROR(s.append(t));
 | 
											
												
													
														|  | 
 |  | +            if constexpr(sizeof...(args) > 0) {
 | 
											
												
													
														|  | 
 |  | +                return formatR(f, s, index, forward<Args>(args)...);
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            while(index < f.getLength()) {
 | 
											
												
													
														|  | 
 |  | +                CORE_RETURN_ERROR(s.append(f[index++]));
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            return Error::NONE;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    Error readUnicode(c32& u, const char*& s);
 |  | 
 | 
											
												
													
														|  | 
 |  | +    template<typename String, typename... Args>
 | 
											
												
													
														|  | 
 |  | +    CError copyFormat(String& result, String& s, Args&&... args) {
 | 
											
												
													
														|  | 
 |  | +        if constexpr(sizeof...(args) > 0) {
 | 
											
												
													
														|  | 
 |  | +            Error e = Internal::formatR(result, s, 0, forward<Args>(args)...);
 | 
											
												
													
														|  | 
 |  | +            if(e == Error::NONE) {
 | 
											
												
													
														|  | 
 |  | +                return result.copyFrom(s);
 | 
											
												
													
														|  | 
 |  | +            } else if(e == Error::CAPACITY_REACHED) {
 | 
											
												
													
														|  | 
 |  | +                (void)result.copyFrom(s);
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            return e;
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        return Error::NONE;
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      class Char32String;
 |  |      class Char32String;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -31,7 +73,7 @@ namespace Core {
 | 
											
												
													
														|  |          CharString(char* buffer, i32 bufferSize);
 |  |          CharString(char* buffer, i32 bufferSize);
 | 
											
												
													
														|  |          CharString(const CharString&) = delete;
 |  |          CharString(const CharString&) = delete;
 | 
											
												
													
														|  |          CharString& operator=(const CharString&) = delete;
 |  |          CharString& operator=(const CharString&) = delete;
 | 
											
												
													
														|  | -        check_return Error copyFrom(const CharString& s);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError copyFrom(const CharString& s);
 | 
											
												
													
														|  |          bool operator==(const char* s) const;
 |  |          bool operator==(const char* s) const;
 | 
											
												
													
														|  |          bool operator==(const CharString& other) const;
 |  |          bool operator==(const CharString& other) const;
 | 
											
												
													
														|  |          bool operator!=(const char* s) const;
 |  |          bool operator!=(const char* s) const;
 | 
											
										
											
												
													
														|  | @@ -39,45 +81,33 @@ namespace Core {
 | 
											
												
													
														|  |          char operator[](int index) const;
 |  |          char operator[](int index) const;
 | 
											
												
													
														|  |          int getLength() const;
 |  |          int getLength() const;
 | 
											
												
													
														|  |          int getCapacity() const;
 |  |          int getCapacity() const;
 | 
											
												
													
														|  | -        check_return Error append(char c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(signed char c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(unsigned char c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(wchar_t c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(c32 c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const char* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const c32* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const signed char* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const unsigned char* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(bool b);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(Error e);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError append(char c);
 | 
											
												
													
														|  | 
 |  | +        CError append(signed char c);
 | 
											
												
													
														|  | 
 |  | +        CError append(unsigned char c);
 | 
											
												
													
														|  | 
 |  | +        CError append(wchar_t c);
 | 
											
												
													
														|  | 
 |  | +        CError append(c32 c);
 | 
											
												
													
														|  | 
 |  | +        CError append(const char* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(const c32* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(const signed char* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(const unsigned char* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(bool b);
 | 
											
												
													
														|  | 
 |  | +        CError append(Error e);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          template<typename T>
 |  |          template<typename T>
 | 
											
												
													
														|  | -        check_return Error append(const T& t) {
 |  | 
 | 
											
												
													
														|  | -            if constexpr(requires { t.toString(*this); }) {
 |  | 
 | 
											
												
													
														|  | -                return t.toString(*this);
 |  | 
 | 
											
												
													
														|  | -            } else {
 |  | 
 | 
											
												
													
														|  | -                char buffer[64];
 |  | 
 | 
											
												
													
														|  | -                CORE_RETURN_ERROR(Core::toString(t, buffer, CORE_SIZE(buffer)));
 |  | 
 | 
											
												
													
														|  | -                return append(static_cast<const char*>(buffer));
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError append(const T& t) {
 | 
											
												
													
														|  | 
 |  | +            return Internal::genericAppend(*this, t);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        check_return Error toString(CharString& s) const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error toString(Char32String& s) const;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError toString(CharString& s) const;
 | 
											
												
													
														|  | 
 |  | +        CError toString(Char32String& s) const;
 | 
											
												
													
														|  |          void clear();
 |  |          void clear();
 | 
											
												
													
														|  |          u32 hashCode() const;
 |  |          u32 hashCode() const;
 | 
											
												
													
														|  | -        check_return Error print() const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error printLine() const;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError print() const;
 | 
											
												
													
														|  | 
 |  | +        CError printLine() const;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          template<typename... Args>
 |  |          template<typename... Args>
 | 
											
												
													
														|  | -        check_return Error format(CharString& s, Args&&... args) {
 |  | 
 | 
											
												
													
														|  | -            Error e = formatBuffer(s, 0, Core::forward<Args>(args)...);
 |  | 
 | 
											
												
													
														|  | -            if(e == Error::NONE) {
 |  | 
 | 
											
												
													
														|  | -                return copyFrom(s);
 |  | 
 | 
											
												
													
														|  | -            } else if(e == Error::CAPACITY_REACHED) {
 |  | 
 | 
											
												
													
														|  | -                (void)copyFrom(s);
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -            return e;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError format(CharString& s, Args&&... args) {
 | 
											
												
													
														|  | 
 |  | +            return copyFormat(*this, s, Core::forward<Args>(args)...);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          bool startsWidth(const CharString& other, int from = 0) const;
 |  |          bool startsWidth(const CharString& other, int from = 0) const;
 | 
											
										
											
												
													
														|  | @@ -85,35 +115,15 @@ namespace Core {
 | 
											
												
													
														|  |          bool contains(const CharString& other, int from = 0) const;
 |  |          bool contains(const CharString& other, int from = 0) const;
 | 
											
												
													
														|  |          int search(char u, int from = 0) const;
 |  |          int search(char u, int from = 0) const;
 | 
											
												
													
														|  |          bool contains(char u, int from = 0) const;
 |  |          bool contains(char u, int from = 0) const;
 | 
											
												
													
														|  | -        check_return Error substring(CharString& s, int from, int to) const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error substring(CharString& s, int from = 0) const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error replace(CharString& s, const CharString& search,
 |  | 
 | 
											
												
													
														|  | -                                   const CharString& replace);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError substring(CharString& s, int from, int to) const;
 | 
											
												
													
														|  | 
 |  | +        CError substring(CharString& s, int from = 0) const;
 | 
											
												
													
														|  | 
 |  | +        CError replace(CharString& s, const CharString& search,
 | 
											
												
													
														|  | 
 |  | +                       const CharString& replace);
 | 
											
												
													
														|  |          void replace(char search, char replace);
 |  |          void replace(char search, char replace);
 | 
											
												
													
														|  |          operator const char*() const;
 |  |          operator const char*() const;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      private:
 |  |      private:
 | 
											
												
													
														|  |          void addToHash(c32 u);
 |  |          void addToHash(c32 u);
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        template<typename T, typename... Args>
 |  | 
 | 
											
												
													
														|  | -        check_return Error formatBuffer(CharString& s, int index, const T& t,
 |  | 
 | 
											
												
													
														|  | -                                        Args&&... args) {
 |  | 
 | 
											
												
													
														|  | -            while(index < length) {
 |  | 
 | 
											
												
													
														|  | -                char u = data[index++];
 |  | 
 | 
											
												
													
														|  | -                if(u == '#') {
 |  | 
 | 
											
												
													
														|  | -                    if(index >= length ||
 |  | 
 | 
											
												
													
														|  | -                       (index < length && data[index] != '#')) {
 |  | 
 | 
											
												
													
														|  | -                        break;
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -                    index++;
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | -                CORE_RETURN_ERROR(s.append(u));
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -            CORE_RETURN_ERROR(s.append(t));
 |  | 
 | 
											
												
													
														|  | -            return formatBuffer(s, index, Core::forward<Args>(args)...);
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        check_return Error formatBuffer(CharString& s, int index);
 |  | 
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      class Char32String {
 |  |      class Char32String {
 | 
											
										
											
												
													
														|  | @@ -135,45 +145,33 @@ namespace Core {
 | 
											
												
													
														|  |          c32 operator[](int index) const;
 |  |          c32 operator[](int index) const;
 | 
											
												
													
														|  |          int getLength() const;
 |  |          int getLength() const;
 | 
											
												
													
														|  |          int getCapacity() const;
 |  |          int getCapacity() const;
 | 
											
												
													
														|  | -        check_return Error append(char c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(signed char c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(unsigned char c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(wchar_t c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(c32 c);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const char* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const c32* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const signed char* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(const unsigned char* s);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(bool b);
 |  | 
 | 
											
												
													
														|  | -        check_return Error append(Error e);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError append(char c);
 | 
											
												
													
														|  | 
 |  | +        CError append(signed char c);
 | 
											
												
													
														|  | 
 |  | +        CError append(unsigned char c);
 | 
											
												
													
														|  | 
 |  | +        CError append(wchar_t c);
 | 
											
												
													
														|  | 
 |  | +        CError append(c32 c);
 | 
											
												
													
														|  | 
 |  | +        CError append(const char* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(const c32* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(const signed char* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(const unsigned char* s);
 | 
											
												
													
														|  | 
 |  | +        CError append(bool b);
 | 
											
												
													
														|  | 
 |  | +        CError append(Error e);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          template<typename T>
 |  |          template<typename T>
 | 
											
												
													
														|  | -        check_return Error append(const T& t) {
 |  | 
 | 
											
												
													
														|  | -            if constexpr(requires { t.toString(*this); }) {
 |  | 
 | 
											
												
													
														|  | -                return t.toString(*this);
 |  | 
 | 
											
												
													
														|  | -            } else {
 |  | 
 | 
											
												
													
														|  | -                char buffer[64];
 |  | 
 | 
											
												
													
														|  | -                CORE_RETURN_ERROR(Core::toString(t, buffer, CORE_SIZE(buffer)));
 |  | 
 | 
											
												
													
														|  | -                return append(static_cast<const char*>(buffer));
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError append(const T& t) {
 | 
											
												
													
														|  | 
 |  | +            return Internal::genericAppend(*this, t);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        check_return Error toString(CharString& s) const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error toString(Char32String& s) const;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError toString(CharString& s) const;
 | 
											
												
													
														|  | 
 |  | +        CError toString(Char32String& s) const;
 | 
											
												
													
														|  |          void clear();
 |  |          void clear();
 | 
											
												
													
														|  |          u32 hashCode() const;
 |  |          u32 hashCode() const;
 | 
											
												
													
														|  | -        check_return Error print() const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error printLine() const;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError print() const;
 | 
											
												
													
														|  | 
 |  | +        CError printLine() const;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          template<typename... Args>
 |  |          template<typename... Args>
 | 
											
												
													
														|  | -        check_return Error format(Char32String& s, Args&&... args) {
 |  | 
 | 
											
												
													
														|  | -            Error e = formatBuffer(s, 0, Core::forward<Args>(args)...);
 |  | 
 | 
											
												
													
														|  | -            if(e == Error::NONE) {
 |  | 
 | 
											
												
													
														|  | -                return copyFrom(s);
 |  | 
 | 
											
												
													
														|  | -            } else if(e == Error::CAPACITY_REACHED) {
 |  | 
 | 
											
												
													
														|  | -                (void)copyFrom(s);
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -            return e;
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError format(Char32String& s, Args&&... args) {
 | 
											
												
													
														|  | 
 |  | +            return copyFormat(*this, s, Core::forward<Args>(args)...);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          bool startsWidth(const Char32String& other, int from = 0) const;
 |  |          bool startsWidth(const Char32String& other, int from = 0) const;
 | 
											
										
											
												
													
														|  | @@ -181,36 +179,15 @@ namespace Core {
 | 
											
												
													
														|  |          bool contains(const Char32String& other, int from = 0) const;
 |  |          bool contains(const Char32String& other, int from = 0) const;
 | 
											
												
													
														|  |          int search(c32 u, int from = 0) const;
 |  |          int search(c32 u, int from = 0) const;
 | 
											
												
													
														|  |          bool contains(c32 u, int from = 0) const;
 |  |          bool contains(c32 u, int from = 0) const;
 | 
											
												
													
														|  | -        check_return Error substring(Char32String& s, int from, int to) const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error substring(Char32String& s, int from = 0) const;
 |  | 
 | 
											
												
													
														|  | -        check_return Error replace(Char32String& s, const Char32String& search,
 |  | 
 | 
											
												
													
														|  | -                                   const Char32String& replace);
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError substring(Char32String& s, int from, int to) const;
 | 
											
												
													
														|  | 
 |  | +        CError substring(Char32String& s, int from = 0) const;
 | 
											
												
													
														|  | 
 |  | +        CError replace(Char32String& s, const Char32String& search,
 | 
											
												
													
														|  | 
 |  | +                       const Char32String& replace);
 | 
											
												
													
														|  |          void replace(c32 search, c32 replace);
 |  |          void replace(c32 search, c32 replace);
 | 
											
												
													
														|  |          operator const c32*() const;
 |  |          operator const c32*() const;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      private:
 |  |      private:
 | 
											
												
													
														|  | -        Error add(c32 c);
 |  | 
 | 
											
												
													
														|  |          void addToHash(c32 u);
 |  |          void addToHash(c32 u);
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        template<typename T, typename... Args>
 |  | 
 | 
											
												
													
														|  | -        check_return Error formatBuffer(Char32String& s, int index, const T& t,
 |  | 
 | 
											
												
													
														|  | -                                        Args&&... args) {
 |  | 
 | 
											
												
													
														|  | -            while(index < length) {
 |  | 
 | 
											
												
													
														|  | -                c32 u = data[index++];
 |  | 
 | 
											
												
													
														|  | -                if(u == '#') {
 |  | 
 | 
											
												
													
														|  | -                    if(index >= length ||
 |  | 
 | 
											
												
													
														|  | -                       (index < length && data[index] != '#')) {
 |  | 
 | 
											
												
													
														|  | -                        break;
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -                    index++;
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | -                CORE_RETURN_ERROR(s.append(u));
 |  | 
 | 
											
												
													
														|  | -            }
 |  | 
 | 
											
												
													
														|  | -            CORE_RETURN_ERROR(s.append(t));
 |  | 
 | 
											
												
													
														|  | -            return formatBuffer(s, index, Core::forward<Args>(args)...);
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        check_return Error formatBuffer(Char32String& s, int index);
 |  | 
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      template<int N, typename C, typename B>
 |  |      template<int N, typename C, typename B>
 | 
											
										
											
												
													
														|  | @@ -238,12 +215,12 @@ namespace Core {
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          template<typename... Args>
 |  |          template<typename... Args>
 | 
											
												
													
														|  | -        check_return Error format(Args&&... args) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError format(Args&&... args) {
 | 
											
												
													
														|  |              ArrayString s;
 |  |              ArrayString s;
 | 
											
												
													
														|  |              return B::format(s, Core::forward<Args>(args)...);
 |  |              return B::format(s, Core::forward<Args>(args)...);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        check_return Error replace(const B& search, const B& replace) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +        CError replace(const B& search, const B& replace) {
 | 
											
												
													
														|  |              ArrayString s;
 |  |              ArrayString s;
 | 
											
												
													
														|  |              return B::replace(s, search, replace);
 |  |              return B::replace(s, search, replace);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
										
											
												
													
														|  | @@ -252,7 +229,7 @@ namespace Core {
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      template<typename String, typename Iterable>
 |  |      template<typename String, typename Iterable>
 | 
											
												
													
														|  | -    check_return Error toString(String& s, const Iterable& i) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    CError toString(String& s, const Iterable& i) {
 | 
											
												
													
														|  |          CORE_RETURN_ERROR(s.append("["));
 |  |          CORE_RETURN_ERROR(s.append("["));
 | 
											
												
													
														|  |          auto current = i.begin();
 |  |          auto current = i.begin();
 | 
											
												
													
														|  |          auto end = i.end();
 |  |          auto end = i.end();
 |