4#include "Stroika/Foundation/StroikaPreComp.h"
14#include "Stroika/Foundation/Containers/Common.h"
35 bool prevCharSpace =
true;
41 prevCharSpace = i.IsWhitespace ();
59 bool nextCharStartsSentence =
true;
61 if (nextCharStartsSentence and i.IsWhitespace ()) {
63 nextCharStartsSentence =
false;
66 nextCharStartsSentence |= (i ==
'.' or i ==
'!' or i ==
'?');
84 if (r[0].ToUpperCase () == r[0] and r[1].ToUpperCase () != r[1]) {
85 r.
SetAt (r[0].ToLowerCase (), 0);
96bool Linguistics::IsAllCaps (
const String& s)
Similar to String, but intended to more efficiently construct a String. Mutable type (String is large...
nonvirtual size_t length() const noexcept
number of characters, not bytes or code-points
nonvirtual void SetAt(Character item, size_t index) noexcept
String is like std::u32string, except it is much easier to use, often much more space efficient,...
nonvirtual String ToUpperCase() const
String CapitalizeEachWord(const String &s)
String CapitalizeEachSentence(const String &s)
String UnCapitalizeFirstWord(const String &s)