8#include "Arp/Base/Core/SecureString.hpp"
9#include "Arp/Base/Rsc/Commons/RscStringBase.hpp"
10#include "Arp/Base/Commons/Exceptions/ArgumentException.hpp"
14namespace Arp::Base::Rsc::Commons
50 const static size_t maxLength = N;
51 const static size_t bufferSize = maxLength + 1;
54 std::array<char, bufferSize> buffer{};
103 this->buffer = arg.buffer;
115 this->buffer = arg.buffer;
142 :
RscString(reinterpret_cast<const char*>(pChars))
169 this->Assign(pChars);
179 this->Assign(
reinterpret_cast<const char*
>(pChars));
198inline std::ostream& operator<<(std::ostream& os,
const RscString<N>& rhs)
209struct fmt::formatter<
Arp::Base::Rsc::Commons::RscString<N>> :
public fmt::ostream_formatter {};
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
size_type Length(void) const
Returns the number of char elements in this string.
Definition: String.ipp:954
const CharType * CStr(void) const
Gets the character data of this string.
Definition: String.ipp:1395
This class is a base class of template class RscString.
Definition: RscStringBase.hpp:27
void SetStringType(RscType value)
Sets the string type of this instance.
Definition: RscStringBase.cpp:171
size_t GetLength(void) const
Gets the length of this string.
Definition: RscStringBase.cpp:49
const char * CStr(void) const
Returns a const char pointer to the internal string buffer.
Definition: RscStringBase.cpp:63
void SetBufferInfo(char *pStringBuffer, size_t bufferSize, size_t strLength=0)
Constructs an empty RscStringBase instance.
Definition: RscStringBase.cpp:93
Contains a static string with string lentgh up to N characters. The string shall be null terminated.
Definition: RscString.hxx:24
RscString(const char *pChars)
Constructs an RscString instance and copies the null terminated c-string in internal buffer.
Definition: RscString.hxx:130
RscString(const RscString &arg)
Default copy constructor.
Definition: RscString.hxx:80
RscString(const char8u *pChars)
Constructs an RscString instance and copies the null terminated c-string in internal buffer.
Definition: RscString.hxx:141
RscString & operator=(const RscString &arg)
Default copy-assignment operator.
Definition: RscString.hxx:101
RscString(void)
Constructs an empty RscString.
Definition: RscString.hxx:62
RscString & operator=(const char8u *pChars)
Assigns the UTF8 char buffer to this instance.
Definition: RscString.hxx:177
RscString & operator=(const String &str)
Assigns the String to this instance.
Definition: RscString.hxx:187
static constexpr size_t GetMaxLength(void)
Get the maximal string length of this instance excluding string terminator.
Definition: RscString.hxx:158
RscString & operator=(const char *pChars)
Assigns the char buffer to this instance.
Definition: RscString.hxx:167
RscString(RscType stringType)
Constructor for type < see cref="RscSecureString"/>.
Definition: RscString.hxx:71
RscString & operator=(RscString &&arg) noexcept
Default move-assignment operator.
Definition: RscString.hxx:113
~RscString(void)
Default destructor.
RscString(RscString &&arg) noexcept
Default move constructor.
Definition: RscString.hxx:90
RscString(const String &arg)
Constructor for type String.
Definition: RscString.hxx:149
char8_t char8u
The Arp UTF8 character type of 1 byte size.
Definition: PrimitiveTypes.hpp:47
Root namespace for the PLCnext API