![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AsciiSet.h>
Public Member Functions | |
| template<typename CharType , int N> | |
| constexpr | FAsciiSet (const CharType(&Chars)[N]) |
| template<typename CharType > | |
| constexpr FORCEINLINE bool | Contains (CharType Char) const |
| template<typename CharType > | |
| constexpr FORCEINLINE uint64 | Test (CharType Char) const |
| constexpr FORCEINLINE FAsciiSet | operator+ (char Char) const |
| constexpr FORCEINLINE FAsciiSet | operator| (FAsciiSet OtherSet) const |
| constexpr FORCEINLINE FAsciiSet | operator& (FAsciiSet OtherSet) const |
| constexpr FORCEINLINE FAsciiSet | operator~ () const |
Static Public Member Functions | |
| template<class CharType > | |
| static constexpr const CharType * | FindFirstOrEnd (const CharType *Str, FAsciiSet Set) |
| template<class CharType > | |
| static constexpr const CharType * | FindLastOrEnd (const CharType *Str, FAsciiSet Set) |
| template<typename CharType > | |
| static constexpr const CharType * | Skip (const CharType *Str, FAsciiSet Set) |
| template<typename CharType > | |
| static constexpr bool | HasAny (const CharType *Str, FAsciiSet Set) |
| template<typename CharType > | |
| static constexpr bool | HasNone (const CharType *Str, FAsciiSet Set) |
| template<typename CharType > | |
| static constexpr bool | HasOnly (const CharType *Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | FindPrefixWith (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | FindPrefixWithout (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | TrimPrefixWith (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | TrimPrefixWithout (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | FindSuffixWith (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | FindSuffixWithout (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | TrimSuffixWith (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr StringType | TrimSuffixWithout (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr bool | HasAny (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr bool | HasNone (const StringType &Str, FAsciiSet Set) |
| template<class StringType > | |
| static constexpr bool | HasOnly (const StringType &Str, FAsciiSet Set) |
ASCII character bitset useful for fast and readable parsing
Entirely constexpr. Works with both wide and narrow strings.
Example use cases:
constexpr FAsciiSet WhitespaceCharacters(" \v\f\t\r\n"); bool bIsWhitespace = WhitespaceCharacters.Test(MyChar); const char* HelloWorld = FAsciiSet::Skip(" \t\tHello world!", WhitespaceCharacters);
constexpr FAsciiSet XmlEscapeChars("&<>\"'"); check(FAsciiSet::HasNone(EscapedXmlString, XmlEscapeChars));
constexpr FAsciiSet Delimiters(".:;"); const TCHAR* DelimiterOrEnd = FAsciiSet::FindFirstOrEnd(PrefixedName, Delimiters); FString Prefix(PrefixedName, DelimiterOrEnd - PrefixedName);
constexpr FAsciiSet Slashes("/\\"); const TCHAR* SlashOrEnd = FAsciiSet::FindLastOrEnd(PathName, Slashes); const TCHAR* FileName = *SlashOrEnd ? SlashOrEnd + 1 : PathName;
|
inlineconstexpr |
|
inlineconstexpr |
Returns true if a character is part of the set
|
inlinestaticconstexpr |
Find first character of string inside set or end pointer. Never returns null.
|
inlinestaticconstexpr |
Find last character of string inside set or end pointer. Never returns null.
|
inlinestaticconstexpr |
Get initial substring with all characters in set
|
inlinestaticconstexpr |
Get initial substring with no characters in set
|
inlinestaticconstexpr |
Get trailing substring with all characters in set
|
inlinestaticconstexpr |
Get trailing substring with no characters in set
|
inlinestaticconstexpr |
Test if string contains any character in set
|
inlinestaticconstexpr |
Test if string contains any character in set
|
inlinestaticconstexpr |
Test if string contains no character in set
|
inlinestaticconstexpr |
Test if string contains no character in set
|
inlinestaticconstexpr |
Test if string contains any character outside of set
|
inlinestaticconstexpr |
Test if string contains any character outside of set
|
inlineconstexpr |
Create new set containing only the characters that exist in both this and another specified set
|
inlineconstexpr |
Create new set with specified character in it
|
inlineconstexpr |
Create new set containing the combination of this set and another
|
inlineconstexpr |
Create new set containing inverse set of characters - likely including null-terminator
|
inlinestaticconstexpr |
Find first character of string outside of set. Never returns null.
|
inlineconstexpr |
Returns non-zero if a character is part of the set. Prefer Contains() to avoid VS2019 conversion warnings.
|
inlinestaticconstexpr |
Trim initial characters in set
|
inlinestaticconstexpr |
Trim initial characters not in set
|
inlinestaticconstexpr |
Trim trailing characters in set
|
inlinestaticconstexpr |
Trim trailing characters not in set