YOUSEFUL / DELPHI / COMPONENTS

TAtlasSpellingIssue

One unknown word found by TAtlasSpellChecker.Check: the word, its one-based start and its length.

Record Unit Atlas.Spell · Product Atlas VCL

Description

Returned in text order by TAtlasSpellChecker.Check.

Members

MemberKindWhat it does
WordfieldThe word as it appears in the text, in its original case.
StartIndexfieldOne-based UTF-16 index of the word's first character in the checked text.
LengthfieldNumber of UTF-16 characters in the word.

Fields

Word field

Word: string;

The word as it appears in the text, in its original case.

StartIndex field

StartIndex, Length: Integer;

One-based UTF-16 index of the word's first character in the checked text.

Length field

StartIndex, Length: Integer;

Number of UTF-16 characters in the word.

Examples

Describe the issues

For hello wrold, hello wrld it returns wrold (7..11) wrld (20..23).

pascal
uses System.SysUtils, Atlas.Spell;

function DescribeIssues(const Issues: TArray<TAtlasSpellingIssue>): string;
var
  Issue: TAtlasSpellingIssue;
begin
  Result := '';
  for Issue in Issues do
    Result := Result + Format('%s (%d..%d) ',
      [Issue.Word, Issue.StartIndex, Issue.StartIndex + Issue.Length - 1]);
end;

TAtlasSpellChecker

Also in Atlas VCL

TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer