UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RemoveFrom.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"
7#include "Misc/CString.h"
8
9namespace UE::String
10{
11 template <typename CharType>
13 {
14 return View.StartsWith(Prefix, SearchCase) ? View.RightChop(Prefix.Len()) : View;
15 }
16
17 template <typename CharType>
19 {
20 return View.EndsWith(Prefix, SearchCase) ? View.LeftChop(Prefix.Len()) : View;
21 }
22} // UE::String
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition StringView.h:107
ViewType LeftChop(int32 CharCount) const
Definition StringView.h:586
bool EndsWith(CharType Suffix) const
Definition StringView.h:371
ViewType RightChop(int32 CharCount) const
Definition StringView.h:599
bool StartsWith(CharType Prefix) const
Definition StringView.h:366
Type
Definition CString.h:21
@ CaseSensitive
Definition CString.h:23
Definition String.cpp.inl:714
TStringView< CharType > RemoveFromEnd(const TStringView< CharType > View, const TStringView< CharType > Prefix, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive)
Definition RemoveFrom.h:18
TStringView< CharType > RemoveFromStart(const TStringView< CharType > View, const TStringView< CharType > Prefix, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive)
Definition RemoveFrom.h:12