Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
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"
6#include "Containers/StringFwd.h"
7#include "Misc/CString.h"
8
9namespace UE::String
10{
11 template <typename CharType>
12 [[nodiscard]] ARK_API inline TStringView<CharType> RemoveFromStart(const TStringView<CharType> View, const TStringView<CharType> Prefix, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive)
13 {
14 return View.StartsWith(Prefix, SearchCase) ? View.RightChop(Prefix.Len()) : View;
15 }
16
17 template <typename CharType>
18 [[nodiscard]] ARK_API inline TStringView<CharType> RemoveFromEnd(const TStringView<CharType> View, const TStringView<CharType> Prefix, ESearchCase::Type SearchCase = ESearchCase::CaseSensitive)
19 {
20 return View.EndsWith(Prefix, SearchCase) ? View.LeftChop(Prefix.Len()) : View;
21 }
22} // UE::String
#define ARK_API
Definition Ark.h:16