Navigation
API > API/Runtime > API/Runtime/uLangCore
A range in a text document/string expressed as (zero-based) begin and end row/column. A range is comparable to a selection in an editor. Therefore the end position is exclusive. Columns are byte offsets into the UTF-8 encoded line.
To specify a range that contains a line including the line ending character(s), use an end position denoting the start of the next line (or) same row and the column just past the last character on the row.
Often used with CUTF8StringView and SIdxRange. CUTF8StringView should do the converting to and from SIdxRange and STextRange.
Similar to a LSP Range - https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#range Also similar to UE `FIntRect_
| Name | STextRange |
| Type | struct |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Text/TextRange.h |
| Include Path | #include "uLang/Common/Text/TextRange.h" |
Syntax
struct STextRange
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE STextRange () |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE STextRange
(
ENoInit |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE STextRange
(
const STextPosition& BeginAndEnd |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE STextRange
(
const STextPosition& Begin, |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE STextRange
(
uint32_t BeginRow, |
uLang/Common/Text/TextRange.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| _Begin | STextPosition | Beginning position (zero-based, inclusive) | uLang/Common/Text/TextRange.h | |
| _End | STextPosition | End position (zero-based, exclusive) | uLang/Common/Text/TextRange.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint32_t BeginColumn() |
uLang/Common/Text/TextRange.h | ||
uint32_t BeginRow() |
uLang/Common/Text/TextRange.h | ||
uint32_t EndColumn() |
uLang/Common/Text/TextRange.h | ||
uint32_t EndRow() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINESTextPosition GetBegin() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINESTextPosition GetEnd() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE void Invalidate() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE void InvalidateEnd() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsContainedIn
(
const STextRange& ContainingRange |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsEmpty() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsInRange
(
const STextPosition& Position |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsInvalid() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsInvalidEnd() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsOrdered() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsRowMulti() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsRowSingle() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsValid() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool IsValidEnd() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE bool Overlaps
(
const STextRange& Other |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE void Reset() |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE void SetBegin
(
const STextPosition& Begin |
uLang/Common/Text/TextRange.h | ||
void SetBeginColumn
(
uint32_t Col |
uLang/Common/Text/TextRange.h | ||
void SetBeginRow
(
uint32_t Row |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINE void SetEnd
(
const STextPosition& End |
uLang/Common/Text/TextRange.h | ||
void SetEndColumn
(
uint32_t Col |
uLang/Common/Text/TextRange.h | ||
void SetEndRow
(
uint32_t Row |
uLang/Common/Text/TextRange.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE bool operator!=
(
const STextRange& Other |
uLang/Common/Text/TextRange.h | ||
ULANG_FORCEINLINESTextRange operator|
(
const STextRange& Other |
Compute the union of two text ranges. | uLang/Common/Text/TextRange.h | |
ULANG_FORCEINLINESTextRange & operator|=
(
const STextRange& Other |
Make this text range the union of this and another. | uLang/Common/Text/TextRange.h | |
ULANG_FORCEINLINE bool operator==
(
const STextRange& Other |
uLang/Common/Text/TextRange.h |