#include "Stroika/Foundation/StroikaPreComp.h"#include <compare>#include <iosfwd>#include <locale>#include <string>#include <string_view>#include "Stroika/Foundation/Characters/Character.h"#include "Stroika/Foundation/Characters/SDKString.h"#include "Stroika/Foundation/Common/Compare.h"#include "Stroika/Foundation/Common/StdCompat.h"#include "Stroika/Foundation/Containers/Sequence.h"#include "Stroika/Foundation/Containers/Set.h"#include "Stroika/Foundation/Memory/SharedByValue.h"#include "Stroika/Foundation/Memory/StackBuffer.h"#include "Stroika/Foundation/Traversal/Iterable.h"#include "String.inl"Go to the source code of this file.
Classes | |
| class | Stroika::Foundation::Characters::String |
| String is like std::u32string, except it is much easier to use, often much more space efficient, and more easily interoperates with other string types. More... | |
| struct | Stroika::Foundation::Characters::String::PeekSpanData |
| Summary data for raw contents of rep - each rep will support at least one of these span forms. More... | |
| class | Stroika::Foundation::Characters::String::_IRep |
| struct | Stroika::Foundation::Characters::String::EqualsComparer |
| struct | Stroika::Foundation::Characters::String::LessComparer |
| very similar to ThreeWayComparer but returns true if less More... | |
| struct | Stroika::Foundation::Characters::StringCombiner< STRING > |
| StringCombiner is a simple function object used to combine two strings visually - used in Iterable<>::Join () More... | |
| struct | qStroika_Foundation_Characters_FMT_PREFIX_::formatter< Stroika::Foundation::Characters::String, wchar_t > |
Namespaces | |
| namespace | Stroika::Foundation |
| namespace | Stroika::Foundation::Containers |
| namespace | Stroika::Foundation::Characters |
| namespace | Stroika::Foundation::Characters::Literals |
| Create a format-string (see std::wformat_string or Stroika FormatString, or python 'f' strings. | |
| namespace | std |
| STL namespace. | |
| namespace | Stroika::Foundation::DataExchange |
Concepts | |
| concept | Stroika::Foundation::Characters::IBasicUNICODEStdString |
| returns true iff T == u8string, u16string, u32string, or wstring - which std::string types can be unambiguously converted to UNICODE | |
| concept | Stroika::Foundation::Characters::IStdPathLike2UNICODEString |
| anything with a 'special .STRINGTYPE conversion' method to UNICODE string, such as filesystem::path | |
| concept | Stroika::Foundation::Characters::IConvertibleToString |
Enumerations | |
| enum class | Stroika::Foundation::Characters::StringShorteningPreference |
Functions | |
| wostream & | Stroika::Foundation::Characters::operator<< (wostream &out, const String &s) |
| template<IConvertibleToString LHS_T, IConvertibleToString RHS_T> requires (derived_from<remove_cvref_t<LHS_T>, String> or derived_from<remove_cvref_t<RHS_T>, String>) | |
| String | Stroika::Foundation::Characters::operator+ (LHS_T &&lhs, RHS_T &&rhs) |
Variables | |
| const function< String(String, String, bool)> | Stroika::Foundation::Characters::kDefaultStringCombiner = StringCombiner<String>{.fSeparator = ", "_k} |
TODO:
@todo Cleanup SubString (), and String::SubString_ use of SharedByValue<TRAITS>::ReadOnlyReference for
performance. At some level - in String::SubString_ - we have a (hidden) sharedPtr and it would
be safe and performant in that case to re-use that shared_ptr to make a new String envelope.
However, I'm not sure its safe in general to have SharedByValue<TRAITS>::ReadOnlyReference expose
its shared_ptr, which appears needed to make this happen.
Not a biggie opportunity, so we can delay this -- LGP 2014-04-10
@todo Add PadLeft/PadRight or FillLeft/FilLRight() - not sure which name is better. But idea is to
produce a string which is identical to the orig except that IF start len < n, then expand it with
the given arg char repeated on the left or right.
@todo RFind() API should be embellished to include startAt etc, like regular Find () - but not 100%
sure - think through...
@todo MAYBE also add ReplaceOne() function (we have ReplaceAll() now) ; see Replace() API in this function? - maybe overload?
@todo Move DOCS in the top of this file down to the appropriate major classes - and then review the implementation and make sure
it is all correct for each (especially SetStorage () stuff looks questionable)
Definition in file String.h.