4#include "../Strings/StringView.h"
114 void internalClear();
122 [[nodiscard]]
bool setTextLengthInBytesIncludingTerminator(
size_t newDataSize);
135 int& writtenCodeUnits);
137 int& writtenCodeUnits);
#define SC_COMPILER_EXPORT
Macro for symbol visibility in non-MSVC compilers.
Definition: Compiler.h:78
StringEncoding
String Encoding (Ascii, Utf8, Utf16)
Definition: StringIterator.h:17
Wraps an OS File descriptor to read and write to and from it.
Definition: FileDescriptor.h:57
Iterates files and directories inside a given path.
Definition: FileSystemIterator.h:34
String with compile time configurable inline storage (small string optimization)
Definition: SmallString.h:21
Builds String out of a sequence of StringView or formatting through StringFormat.
Definition: StringBuilder.h:16
Converts String to a different encoding (UTF8, UTF16).
Definition: StringConverter.h:25
bool convertNullTerminateFastPath(StringView input, StringView &encodedText)
Converts a given input StringView to null-terminated version.
static bool convertEncodingTo(StringEncoding encoding, StringView text, Vector< char > &buffer, StringView *encodedText=nullptr, NullTermination nullTerminate=AddZeroTerminator)
Converts text to (eventually null terminated) requested encoding.
NullTermination
Specifies if to add a null terminator.
Definition: StringConverter.h:28
@ DoNotAddZeroTerminator
A null terminator will NOT be added at the end of the String.
Definition: StringConverter.h:30
@ AddZeroTerminator
A null terminator will be added at the end of the String.
Definition: StringConverter.h:29
static bool convertEncodingToUTF8(StringView text, Vector< char > &buffer, StringView *encodedText=nullptr, NullTermination nullTerminate=AddZeroTerminator)
Converts text to (eventually null terminated) UTF8 encoding.
static bool convertEncodingToUTF16(StringView text, Vector< char > &buffer, StringView *encodedText=nullptr, NullTermination nullTerminate=AddZeroTerminator)
Converts text to (eventually null terminated) UTF16 encoding.
Flags
Clearing flags used when initializing destination buffer.
Definition: StringConverter.h:66
@ Clear
Destination buffer will be cleared before pushing to it.
Definition: StringConverter.h:67
@ DoNotClear
Destination buffer will not be cleared before pushing to it.
Definition: StringConverter.h:68
StringConverter(Vector< char > &text, StringEncoding encoding)
Create a StringBuilder that will push to given Vector, with specific encoding.
bool appendNullTerminated(StringView input, bool popExistingNullTerminator=true)
Appends the given StringView and adds null-terminator.
StringConverter(String &text, Flags flags=DoNotClear)
Create a StringBuilder that will push to given String.
A non-modifiable owning string with associated encoding.
Definition: String.h:30
Non-owning view over a range of characters with UTF Encoding.
Definition: StringView.h:47
A contiguous sequence of heap allocated elements.
Definition: Vector.h:51