UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StringView.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Concepts/CharType.h"
10#include "Concepts/NotCVRefTo.h"
12#include "Containers/StringFwd.h" // IWYU pragma: export
13#include "HAL/UnrealMemory.h"
14#include "Math/NumericLimits.h"
16#include "Misc/Crc.h"
17#include "Misc/CString.h"
18#include "Misc/ReverseIterate.h"
19#include "Misc/UEOps.h"
20#include "String/Find.h"
22#include "Traits/ElementType.h"
24#include "Traits/IsCharType.h"
26#include <type_traits>
27
28namespace UE::Core::Private
29{
31 template <typename... ArgTypes>
32 constexpr inline auto StringViewGetData(ArgTypes&&... Args) -> decltype(GetData(Forward<ArgTypes>(Args)...))
33 {
34 return GetData(Forward<ArgTypes>(Args)...);
35 }
36
37 template<UE::CCharType CharType>
38 constexpr int32 StringLength(const CharType* InString)
39 {
40 int32 Count = 0;
41 if (InString)
42 {
44 {
45 while (*InString++)
46 {
47 ++Count;
48 }
49 }
50 else
51 {
53 }
54 }
55 return Count;
56 }
57} // UE::Core::Private
58
105template <UE::CCharType CharType>
107{
108public:
109 using ElementType = CharType;
111
112public:
114 [[nodiscard]] constexpr TStringView() = default;
115
117 [[nodiscard]] constexpr inline TStringView(const CharType* InData UE_LIFETIMEBOUND)
118 : DataPtr(InData)
119 , Size(UE::Core::Private::StringLength(InData))
120 {
121 }
122
124 [[nodiscard]] constexpr inline TStringView(const CharType* InData UE_LIFETIMEBOUND, int32 InSize)
125 : DataPtr(InData)
126 , Size(InSize)
127 {
128 }
129
131 template <UE::CCompatibleCharType<CharType> OtherCharType>
133 : DataPtr((const CharType*)InData)
134 , Size(UE::Core::Private::StringLength((const CharType*)InData))
135 {
136 }
137
139 template <UE::CCompatibleCharType<CharType> OtherCharType>
141 : DataPtr((const CharType*)InData)
142 , Size(InSize)
143 {
144 }
145
147 template <UE::CNotCVRefTo<ViewType> CharRangeType>
148 // !std::is_pointer is used here to force the pointer constructor to be used when passed an array or pointer.
149 requires (!std::is_pointer_v<std::decay_t<CharRangeType>> && UE::CCompatibleStringViewable<CharRangeType, CharType>)
150 [[nodiscard]] constexpr inline TStringView(const CharRangeType& InRange UE_LIFETIMEBOUND)
151 : DataPtr((const CharType*)UE::Core::Private::StringViewGetData(InRange))
153 {
154 }
155
157 [[nodiscard]] inline const CharType& operator[](int32 Index) const;
158
160 [[nodiscard]] constexpr inline const CharType* GetData() const
161 {
162 return DataPtr;
163 }
164
165 // Capacity
166
168 [[nodiscard]] constexpr inline SIZE_T NumBytes() const
169 {
170 return static_cast<SIZE_T>(Size) * sizeof(CharType);
171 }
172
174 [[nodiscard]] constexpr inline int32 Len() const
175 {
176 return Size;
177 }
178
180 [[nodiscard]] constexpr inline bool IsEmpty() const
181 {
182 return Size == 0;
183 }
184
185 // Modifiers
186
189 {
191 Size -= CharCount;
192 }
195 {
196 Size -= CharCount;
197 }
199 inline void Reset()
200 {
201 DataPtr = nullptr;
202 Size = 0;
203 }
204
205 // Operations
206
216 inline int32 CopyString(CharType* Dest, int32 CharCount, int32 Position = 0) const;
217
220 {
221 return Mid(Position, CharCount);
222 }
223
226
229
232
235
238
241
243 [[nodiscard]] inline ViewType TrimStart() const;
244
246 [[nodiscard]] inline ViewType TrimEnd() const;
247
250 {
251 *this = Left(CharCount);
252 }
253
256 {
257 *this = LeftChop(CharCount);
258 }
259
262 {
263 *this = Right(CharCount);
264 }
265
268 {
269 *this = RightChop(CharCount);
270 }
271
274 {
275 *this = Mid(Position, CharCount);
276 }
277
280 {
281 *this = TrimStartAndEnd();
282 }
283
285 inline void TrimStartInline()
286 {
287 *this = TrimStart();
288 }
289
291 inline void TrimEndInline()
292 {
293 *this = TrimEnd();
294 }
295
296 // Comparison
297
305 template <UE::CCharType OtherCharType>
307 {
308 return Len() == OtherView.Len() && Compare(OtherView, SearchCase) == 0;
309 }
310
317 template <UE::CStringViewable OtherRangeType>
319
326 template <UE::CCharType OtherCharType>
328 {
329 return PrivateEquals(Other, SearchCase);
330 }
331
339 template <UE::CStringViewable OtherRangeType>
341
349 template <UE::CCharType OtherCharType>
351 {
352 return PrivateCompare(Other, SearchCase);
353 }
354
362 template <UE::CCharType OtherCharType>
364
366 [[nodiscard]] inline bool StartsWith(CharType Prefix) const { return Size >= 1 && DataPtr[0] == Prefix; }
368 [[nodiscard]] inline bool StartsWith(ViewType Prefix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const;
369
371 [[nodiscard]] inline bool EndsWith(CharType Suffix) const { return Size >= 1 && DataPtr[Size-1] == Suffix; }
373 [[nodiscard]] inline bool EndsWith(ViewType Suffix, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase) const;
374
375 // Searching/Finding
376
385 [[nodiscard]] inline int32 Find(ViewType Search, int32 StartPosition = 0, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive) const;
386
394 [[nodiscard]] inline bool Contains(ViewType Search, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive) const
395 {
396 return Find(Search, 0, SearchCase) != INDEX_NONE;
397 }
398
406 inline bool FindChar(CharType Search, int32& OutIndex) const;
407
415 inline bool FindLastChar(CharType Search, int32& OutIndex) const;
416
425 {
426 return Index >= 0 && Index < Len();
427 }
428
429private:
430 static bool PrivateEquals(TStringView Lhs, const CharType* Rhs);
431 static bool PrivateEquals(TStringView Lhs, TStringView Rhs);
432 static bool PrivateLess(TStringView Lhs, TStringView Rhs);
433 static bool PrivateGreater(TStringView Lhs, TStringView Rhs);
434
435 template <UE::CCharType OtherCharType>
436 inline bool PrivateEquals(const OtherCharType* Other, ESearchCase::Type SearchCase) const;
437
438 template <UE::CCharType OtherCharType>
439 inline int32 PrivateCompare(TStringView<OtherCharType> Other, ESearchCase::Type SearchCase) const;
440
441public:
442 [[nodiscard]] friend constexpr inline auto GetNum(TStringView String)
443 {
444 return String.Len();
445 }
446
448 [[nodiscard]] friend inline uint32 GetTypeHash(TStringView View)
449 {
450 // This must match the GetTypeHash behavior of FString
451 return FCrc::Strihash_DEPRECATED(View.Len(), View.GetData());
452 }
453
454 [[nodiscard]] inline bool UEOpEquals(TStringView Rhs) const
455 {
456 return this->Equals(Rhs, ESearchCase::IgnoreCase);
457 }
458
459 [[nodiscard]] inline bool UEOpLessThan(TStringView Rhs) const
460 {
461 return this->Compare(Rhs, ESearchCase::IgnoreCase) < 0;
462 }
463
464 template <UE::CConvertibleTo<TStringView> CharRangeType>
466 {
467 return TStringView::PrivateEquals(*this, ImplicitConv<TStringView>(Forward<CharRangeType>(Rhs)));
468 }
469
470 template <UE::CConvertibleTo<TStringView> CharRangeType>
472 {
473 return TStringView::PrivateLess(*this, ImplicitConv<TStringView>(Forward<CharRangeType>(Rhs)));
474 }
475
476 template <UE::CConvertibleTo<TStringView> CharRangeType>
478 {
479 return TStringView::PrivateGreater(*this, ImplicitConv<TStringView>(Forward<CharRangeType>(Rhs)));
480 }
481
482 [[nodiscard]] UE_REWRITE bool UEOpEquals(const CharType* Rhs) const
483 {
484 return TStringView::PrivateEquals(*this, Rhs);
485 }
486
487public:
492 [[nodiscard]] constexpr inline const CharType* begin() const { return DataPtr; }
493 [[nodiscard]] constexpr inline const CharType* end() const { return DataPtr + Size; }
496
497protected:
498 const CharType* DataPtr = nullptr;
500};
501
502template <typename CharRangeType>
505
506template <typename CharPtrOrRangeType>
507 requires (!std::is_pointer_v<CharPtrOrRangeType> || TIsCharType_V<std::remove_pointer_t<CharPtrOrRangeType>>)
512
513template <UE::CCharType CharType>
514[[nodiscard]] constexpr inline auto MakeStringView(const CharType* CharPtr UE_LIFETIMEBOUND, int32 Size) -> decltype(TStringView(CharPtr, Size))
515{
516 return TStringView(CharPtr, Size);
517}
518
520
521#if PLATFORM_TCHAR_IS_UTF8CHAR
522[[nodiscard]] inline FStringView operator""_PrivateSV(const ANSICHAR* String, size_t Size)
523{
524 return FStringView((const UTF8CHAR*)String, Size);
525}
526#else
527[[nodiscard]] constexpr inline FStringView operator""_PrivateSV(const TCHAR* String, size_t Size)
528{
529 return FStringView(String, (int32)Size);
530}
531#endif
532
533[[nodiscard]] constexpr inline FAnsiStringView operator""_PrivateASV(const ANSICHAR* String, size_t Size)
534{
536}
537
538[[nodiscard]] constexpr inline FWideStringView operator""_PrivateWSV(const WIDECHAR* String, size_t Size)
539{
541}
542
543[[nodiscard]] /*constexpr*/ inline FUtf8StringView operator""_PrivateU8SV(const ANSICHAR* String, size_t Size)
544{
545 // Would like this operator to be constexpr, but cannot be until after this operator can take a UTF8CHAR*
546 // rather than an ANSICHAR*, which won't be until we have C++20 char8_t string literals.
547 return FUtf8StringView(reinterpret_cast<const UTF8CHAR*>(String), (int32)Size);
548}
549
550#if PLATFORM_TCHAR_IS_UTF8CHAR
551 #define TEXTVIEW(str) (str##_PrivateSV)
552#else
553 #define TEXTVIEW(str) TEXT(str##_PrivateSV)
554#endif
555#define ANSITEXTVIEW(str) (str##_PrivateASV)
556#define WIDETEXTVIEW(str) PREPROCESSOR_JOIN(WIDETEXT(str), _PrivateWSV)
557#define UTF8TEXTVIEW(str) (str##_PrivateU8SV)
558
560
561template <UE::CCharType CharType>
563{
564 checkf(Index >= 0 && Index < Size, TEXT("Index out of bounds on StringView: index %i on a view with a length of %i"), Index, Size);
565 return DataPtr[Index];
566}
567
568template <UE::CCharType CharType>
570{
571 const int32 CopyCount = FMath::Min(Size - Position, CharCount);
572 if (CopyCount > 0)
573 {
574 FMemory::Memcpy(Dest, DataPtr + Position, CopyCount * sizeof(CharType));
575 }
576 return CopyCount;
577}
578
579template <UE::CCharType CharType>
584
585template <UE::CCharType CharType>
590
591template <UE::CCharType CharType>
597
598template <UE::CCharType CharType>
604
605template <UE::CCharType CharType>
607{
608 const CharType* CurrentStart = GetData();
609 const int32 CurrentLength = Len();
610
611 // Clamp minimum position at the start of the string, adjusting the length down if necessary
612 const int32 NegativePositionOffset = (Position < 0) ? Position : 0;
615
616 // Clamp maximum position at the end of the string
617 Position = (Position > CurrentLength) ? CurrentLength : Position;
618
619 // Clamp count between 0 and the distance to the end of the string
620 CharCount = FMath::Clamp(CharCount, 0, (CurrentLength - Position));
621
623 return Result;
624}
625
626template <UE::CCharType CharType>
628{
629 return TrimStart().TrimEnd();
630}
631
632template <UE::CCharType CharType>
634{
635 int32 SpaceCount = 0;
636 for (CharType Char : *this)
637 {
639 {
640 break;
641 }
642 ++SpaceCount;
643 }
644 return ViewType(DataPtr + SpaceCount, Size - SpaceCount);
645}
646
647template <UE::CCharType CharType>
649{
650 int32 NewSize = Size;
651 while (NewSize && TChar<CharType>::IsWhitespace(DataPtr[NewSize - 1]))
652 {
653 --NewSize;
654 }
655 return ViewType(DataPtr, NewSize);
656}
657
658template <UE::CCharType CharType>
659template <UE::CCharType OtherCharType>
660[[nodiscard]] inline bool TStringView<CharType>::PrivateEquals(const OtherCharType* const Other, ESearchCase::Type SearchCase) const
661{
662 if (IsEmpty())
663 {
664 return !*Other;
665 }
666
667 if (SearchCase == ESearchCase::CaseSensitive)
668 {
669 return FPlatformString::Strncmp(GetData(), Other, Len()) == 0 && !Other[Len()];
670 }
671 else
672 {
673 return FPlatformString::Strnicmp(GetData(), Other, Len()) == 0 && !Other[Len()];
674 }
675}
676
677template <UE::CCharType CharType>
678template <UE::CCharType OtherCharType>
680{
681 const int32 SelfLen = Len();
682 const int32 OtherLen = OtherView.Len();
683 const int32 MinLen = FMath::Min(SelfLen, OtherLen);
684
685 if (!SelfLen || !OtherLen)
686 {
687 return SelfLen - OtherLen;
688 }
689
690 int Result;
691 if (SearchCase == ESearchCase::CaseSensitive)
692 {
693 Result = FPlatformString::Strncmp(GetData(), OtherView.GetData(), MinLen);
694 }
695 else
696 {
697 Result = FPlatformString::Strnicmp(GetData(), OtherView.GetData(), MinLen);
698 }
699
700 if (Result != 0)
701 {
702 return Result;
703 }
704
705 return SelfLen - OtherLen;
706}
707
708template <UE::CCharType CharType>
709template <UE::CCharType OtherCharType>
711{
712 if (IsEmpty())
713 {
714 return -!!*Other;
715 }
716
717 int Result;
718 if (SearchCase == ESearchCase::CaseSensitive)
719 {
720 Result = FPlatformString::Strncmp(GetData(), Other, Len());
721 }
722 else
723 {
724 Result = FPlatformString::Strnicmp(GetData(), Other, Len());
725 }
726
727 if (Result != 0)
728 {
729 return Result;
730 }
731
732 // Equal if Other[Len()] is '\0' and less otherwise. !!Other[Len()] is 0 for '\0' and 1 otherwise.
733 return -!!Other[Len()];
734}
735
736template <UE::CCharType CharType>
738{
739 return Prefix.Equals(Left(Prefix.Len()), SearchCase);
740}
741
742template <UE::CCharType CharType>
744{
745 return Suffix.Equals(Right(Suffix.Len()), SearchCase);
746}
747
748template <UE::CCharType CharType>
749[[nodiscard]] inline int32 TStringView<CharType>::Find(const ViewType Search, const int32 StartPosition, ESearchCase::Type SearchCase) const
750{
751 const int32 Index = UE::String::FindFirst(RightChop(StartPosition), Search, SearchCase);
752 return Index == INDEX_NONE ? INDEX_NONE : Index + StartPosition;
753}
754
755template <UE::CCharType CharType>
756inline bool TStringView<CharType>::FindChar(const CharType Search, int32& OutIndex) const
757{
758 OutIndex = UE::String::FindFirstChar(*this, Search);
759 return OutIndex != INDEX_NONE;
760}
761
762template <UE::CCharType CharType>
763inline bool TStringView<CharType>::FindLastChar(const CharType Search, int32& OutIndex) const
764{
765 OutIndex = UE::String::FindLastChar(*this, Search);
766 return OutIndex != INDEX_NONE;
767}
768
769template <UE::CCharType CharType>
770[[nodiscard]] inline bool TStringView<CharType>::PrivateEquals(TStringView Lhs, const CharType* Rhs)
771{
772 return Lhs.Equals(Rhs, ESearchCase::IgnoreCase);
773}
774
775template <UE::CCharType CharType>
777{
778 return Lhs.Equals(Rhs, ESearchCase::IgnoreCase);
779}
780
781template <UE::CCharType CharType>
783{
784 return Lhs.Compare(Rhs, ESearchCase::IgnoreCase) < 0;
785}
786
787template <UE::CCharType CharType>
789{
790 return Lhs.Compare(Rhs, ESearchCase::IgnoreCase) > 0;
791}
792
793template <UE::CCharType CharType>
794template <UE::CStringViewable OtherRangeType>
796{
797 return Equals(MakeStringView(Other), SearchCase);
798}
799
800template <UE::CCharType CharType>
801template <UE::CStringViewable OtherRangeType>
803{
804 return Compare(MakeStringView(Other), SearchCase);
805}
806
807#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_7
808#include "Templates/Requires.h"
809#endif
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_IF_CONSTEVAL
Definition Platform.h:786
#define UE_LIFETIMEBOUND
Definition Platform.h:812
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::WIDECHAR WIDECHAR
A wide character. Normally a signed type.
Definition Platform.h:1133
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::UTF8CHAR UTF8CHAR
An 8-bit character containing a UTF8 (Unicode, 8-bit, variable-width) code unit.
Definition Platform.h:1137
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
FPlatformTypes::ANSICHAR ANSICHAR
An ANSI character. Normally a signed type.
Definition Platform.h:1131
#define UE_REWRITE
Definition Platform.h:747
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
@ Char
Character type.
#define MAX_int32
Definition NumericLimits.h:25
auto GetData(const TStringConversion< Converter, DefaultConversionSize > &Conversion) -> decltype(Conversion.Get())
Definition StringConv.h:802
TStringView< UTF8CHAR > FUtf8StringView
Definition StringFwd.h:48
TStringView< TCHAR > FStringView
Definition StringFwd.h:45
TStringView< WIDECHAR > FWideStringView
Definition StringFwd.h:47
TStringView< ANSICHAR > FAnsiStringView
Definition StringFwd.h:46
constexpr auto MakeStringView(const CharPtrOrRangeType &CharPtrOrRange UE_LIFETIMEBOUND) -> decltype(TStringView(CharPtrOrRange))
Definition StringView.h:508
uint32 Size
Definition VulkanMemory.cpp:4034
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Core.Build.cs:8
Definition StringView.h:107
void LeftChopInline(int32 CharCount)
Definition StringView.h:255
ViewType Right(int32 CharCount) const
Definition StringView.h:592
constexpr const CharType * end() const
Definition StringView.h:493
int32 Compare(const OtherRangeType &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:802
void RightChopInline(int32 CharCount)
Definition StringView.h:267
friend uint32 GetTypeHash(TStringView View)
Definition StringView.h:448
ViewType SubStr(int32 Position, int32 CharCount) const
Definition StringView.h:219
const CharType * DataPtr
Definition StringView.h:498
int32 CopyString(CharType *Dest, int32 CharCount, int32 Position=0) const
Definition StringView.h:569
ViewType LeftChop(int32 CharCount) const
Definition StringView.h:586
UE_REWRITE bool UEOpEquals(const CharType *Rhs) const
Definition StringView.h:482
constexpr TStringView(const CharType *InData UE_LIFETIMEBOUND)
Definition StringView.h:117
CharType ElementType
Definition StringView.h:109
constexpr TReversePointerIterator< const CharType > rbegin() const
Definition StringView.h:494
void Reset()
Definition StringView.h:199
bool FindLastChar(CharType Search, int32 &OutIndex) const
Definition StringView.h:763
bool Equals(const OtherCharType *Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:327
constexpr bool IsEmpty() const
Definition StringView.h:180
UE_REWRITE auto UEOpEquals(CharRangeType &&Rhs) const
Definition StringView.h:465
UE_REWRITE auto UEOpLessThan(CharRangeType &&Rhs)
Definition StringView.h:471
bool Contains(ViewType Search, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:394
void RightInline(int32 CharCount)
Definition StringView.h:261
bool EndsWith(ViewType Suffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition StringView.h:743
void RemoveSuffix(int32 CharCount)
Definition StringView.h:194
constexpr TStringView(const CharRangeType &InRange UE_LIFETIMEBOUND)
Definition StringView.h:150
bool Equals(TStringView< OtherCharType > OtherView, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:306
int32 Compare(TStringView< OtherCharType > Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:350
bool EndsWith(CharType Suffix) const
Definition StringView.h:371
void TrimStartInline()
Definition StringView.h:285
constexpr TStringView(const OtherCharType *InData UE_LIFETIMEBOUND, int32 InSize)
Definition StringView.h:140
int32 Compare(const OtherCharType *Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:710
void RemovePrefix(int32 CharCount)
Definition StringView.h:188
ViewType Mid(int32 Position, int32 CharCount=MAX_int32) const
Definition StringView.h:606
constexpr int32 Len() const
Definition StringView.h:174
bool UEOpLessThan(TStringView Rhs) const
Definition StringView.h:459
const CharType & operator[](int32 Index) const
Definition StringView.h:562
void TrimStartAndEndInline()
Definition StringView.h:279
ViewType RightChop(int32 CharCount) const
Definition StringView.h:599
UE_REWRITE auto UEOpGreaterThan(CharRangeType &&Rhs)
Definition StringView.h:477
ViewType TrimStart() const
Definition StringView.h:633
ViewType Left(int32 CharCount) const
Definition StringView.h:580
void MidInline(int32 Position, int32 CharCount=MAX_int32)
Definition StringView.h:273
bool Equals(const OtherRangeType &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:795
constexpr TReversePointerIterator< const CharType > rend() const
Definition StringView.h:495
bool UEOpEquals(TStringView Rhs) const
Definition StringView.h:454
constexpr SIZE_T NumBytes() const
Definition StringView.h:168
constexpr const CharType * GetData() const
Definition StringView.h:160
constexpr TStringView(const CharType *InData UE_LIFETIMEBOUND, int32 InSize)
Definition StringView.h:124
bool StartsWith(CharType Prefix) const
Definition StringView.h:366
void TrimEndInline()
Definition StringView.h:291
void LeftInline(int32 CharCount)
Definition StringView.h:249
friend constexpr auto GetNum(TStringView String)
Definition StringView.h:442
int32 Find(ViewType Search, int32 StartPosition=0, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
Definition StringView.h:749
int32 Size
Definition StringView.h:499
constexpr const CharType * begin() const
Definition StringView.h:492
bool StartsWith(ViewType Prefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
Definition StringView.h:737
TStringView(const OtherCharType *InData UE_LIFETIMEBOUND)
Definition StringView.h:132
constexpr TStringView()=default
UE_FORCEINLINE_HINT bool IsValidIndex(int32 Index) const
Definition StringView.h:424
ViewType TrimStartAndEnd() const
Definition StringView.h:627
bool FindChar(CharType Search, int32 &OutIndex) const
Definition StringView.h:756
ViewType TrimEnd() const
Definition StringView.h:648
Definition CompatibleStringViewable.h:15
Type
Definition CString.h:21
@ IgnoreCase
Definition CString.h:26
@ CaseSensitive
Definition CString.h:23
Definition OverriddenPropertySet.cpp:45
implementation
Definition PlayInEditorLoadingScope.h:8
constexpr auto StringViewGetData(ArgTypes &&... Args) -> decltype(GetData(Forward< ArgTypes >(Args)...))
Definition StringView.h:32
constexpr int32 StringLength(const CharType *InString)
Definition StringView.h:38
UE_STRING_CLASS Result(Forward< LhsType >(Lhs), RhsLen)
Definition String.cpp.inl:732
int32 FindLastChar(FUtf8StringView View, UTF8CHAR Search, ESearchCase::Type SearchCase)
Definition Find.cpp:455
int32 FindFirst(FUtf8StringView View, FUtf8StringView Search, ESearchCase::Type SearchCase)
Definition Find.cpp:395
int32 FindFirstChar(FUtf8StringView View, UTF8CHAR Search, ESearchCase::Type SearchCase)
Definition Find.cpp:445
Definition AdvancedWidgetsModule.cpp:13
U16 Index
Definition radfft.cpp:71
static uint32 Strihash_DEPRECATED(const CharType *Data)
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
static UE_FORCEINLINE_HINT void * Memcpy(void *Dest, const void *Src, SIZE_T Count)
Definition UnrealMemory.h:160
static int32 Strlen(const CharType *String)
Definition CString.h:1047
Definition Char.h:76
Definition ReverseIterate.h:13