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 |
|---|---|---|---|
STextRange () |
uLang/Common/Text/TextRange.h | ||
STextRange
(
ENoInit |
uLang/Common/Text/TextRange.h | ||
STextRange
(
const STextPosition& BeginAndEnd |
uLang/Common/Text/TextRange.h | ||
STextRange
(
const STextPosition& Begin, |
uLang/Common/Text/TextRange.h | ||
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 | ||
STextPosition GetBegin() |
uLang/Common/Text/TextRange.h | ||
STextPosition GetEnd() |
uLang/Common/Text/TextRange.h | ||
void Invalidate() |
uLang/Common/Text/TextRange.h | ||
void InvalidateEnd() |
uLang/Common/Text/TextRange.h | ||
bool IsContainedIn
(
const STextRange& ContainingRange |
uLang/Common/Text/TextRange.h | ||
bool IsEmpty() |
uLang/Common/Text/TextRange.h | ||
bool IsInRange
(
const STextPosition& Position |
uLang/Common/Text/TextRange.h | ||
bool IsInRangeInclusive
(
const STextPosition& Position |
uLang/Common/Text/TextRange.h | ||
bool IsInvalid() |
uLang/Common/Text/TextRange.h | ||
bool IsInvalidEnd() |
uLang/Common/Text/TextRange.h | ||
bool IsOrdered() |
uLang/Common/Text/TextRange.h | ||
bool IsRowMulti() |
uLang/Common/Text/TextRange.h | ||
bool IsRowSingle() |
uLang/Common/Text/TextRange.h | ||
bool IsValid() |
uLang/Common/Text/TextRange.h | ||
bool IsValidEnd() |
uLang/Common/Text/TextRange.h | ||
bool Overlaps
(
const STextRange& Other |
uLang/Common/Text/TextRange.h | ||
void Reset() |
uLang/Common/Text/TextRange.h | ||
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 | ||
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 |
|---|---|---|---|
bool operator!=
(
const STextRange& Other |
uLang/Common/Text/TextRange.h | ||
STextRange operator|
(
const STextRange& Other |
Compute the union of two text ranges. | uLang/Common/Text/TextRange.h | |
STextRange & operator|=
(
const STextRange& Other |
Make this text range the union of this and another. | uLang/Common/Text/TextRange.h | |
bool operator==
(
const STextRange& Other |
uLang/Common/Text/TextRange.h |