Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FString
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 Find
(
CharRangeType&& SubStr, |
Searches the string for a substring. | ||
int32 Find
(
const ElementType* SubStr, |
Searches the string for a substring. | ||
int32 Find
(
const FString& SubStr, |
Searches the string for a substring. | ||
int32 Find
(
const ElementType* SubStr, |
Searches the string for a substring. |
Find(CharRangeType &&, ESearchCase::Type, ESearchDir::Type, int32)
Description
Searches the string for a substring. Can search from beginning or end, and ignore case or not.
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - GetNum(SubStr), therefore:FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE
Consider using UE::String::FindLast() as an alternative.
| Name | Find |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/UnrealString.h.inl |
| Include Path | #include "Containers/UnrealString.h.inl" |
template<typename CharRangeType, typename CharRangeElementType>
int32 Find
(
CharRangeType && SubStr,
ESearchCase::Type SearchCase,
ESearchDir::Type SearchDir,
int32 StartPosition
) const
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Parameters
| Name | Remarks |
|---|---|
| SubStr | The string to search for |
| SearchCase | Indicates whether the search is case sensitive or not (defaults to ESearchCase::IgnoreCase) |
| SearchDir | Indicates whether the search starts at the beginning or at the end (defaults to ESearchDir::FromStart) |
| StartPosition | The start character position to search from |
Find(const ElementType *, ESearchCase::Type, ESearchDir::Type, int32)
Description
Searches the string for a substring. Can search from beginning or end, and ignore case or not.
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - Strlen(SubStr), therefore:FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE
Consider using UE::String::FindLast() as an alternative.
| Name | Find |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/UnrealString.h.inl |
| Include Path | #include "Containers/UnrealString.h.inl" |
int32 Find
(
const ElementType * SubStr,
ESearchCase::Type SearchCase,
ESearchDir::Type SearchDir,
int32 StartPosition
) const
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Parameters
| Name | Remarks |
|---|---|
| SubStr | The string array of characters to search for |
| SearchCase | Indicates whether the search is case sensitive or not |
| SearchDir | Indicates whether the search starts at the beginning or at the end. |
| StartPosition | The start character position to search from. See note below. |
Find(const FString &, ESearchCase::Type, ESearchDir::Type, int32)
Description
Searches the string for a substring. Can search from beginning or end, and ignore case or not.
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - SubStr.Len(), therefore:FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE
Consider using UE::String::FindLast() as an alternative.
| Name | Find |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/UnrealString.h.inl |
| Include Path | #include "Containers/UnrealString.h.inl" |
int32 Find
(
const FString & SubStr,
ESearchCase::Type SearchCase,
ESearchDir::Type SearchDir,
int32 StartPosition
) const
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Parameters
| Name | Remarks |
|---|---|
| SubStr | The string array of characters to search for |
| StartPosition | The start character position to search from. See note below. |
| SearchCase | Indicates whether the search is case sensitive or not |
| SearchDir | Indicates whether the search starts at the beginning or at the end. |
Find(const ElementType *, int32, ESearchCase::Type, ESearchDir::Type, int32)
Description
Searches the string for a substring. Can search from beginning or end, and ignore case or not.
When searching backwards where a StartPosition is provided, searching will actually begin from StartPosition - InSubStrLen, therefore:FString("X").Find("X", ESearchCase::CaseSensitive, ESearchDir::FromEnd, 0) == INDEX_NONE
Consider using UE::String::FindLast() as an alternative.
| Name | Find |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/UnrealString.h.inl |
| Include Path | #include "Containers/UnrealString.h.inl" |
| Source | /Engine/Source/Runtime/Core/Private/Containers/String.cpp.inl |
int32 Find
(
const ElementType * SubStr,
int32 InSubStrLen,
ESearchCase::Type SearchCase,
ESearchDir::Type SearchDir,
int32 StartPosition
) const
Index into this string of the first found instance. If SubStr is empty, returns clamped StartPosition.
Parameters
| Name | Remarks |
|---|---|
| SubStr | The string array of characters to search for |
| SubStrLen | The length of the SubStr array |
| SearchCase | Indicates whether the search is case sensitive or not |
| SearchDir | Indicates whether the search starts at the beginning or at the end. |
| StartPosition | The start character position to search from. See note below. |