VSS.Strings.Cursors.Iterators.Lines

Entities

Tagged Types

Subprograms

Description

Copyright (C) 2021-2023, AdaCore

SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Element_Terminator

function Element_Terminator
  (Self : Line_Iterator'Class) return VSS.Strings.Virtual_String

Return line terminator sequence of the current line. Return empty string when line is not terminated by line termination sequence (it is last line in the source string).

Parameters
Self
Return Value

Has_Line_Terminator

function Has_Line_Terminator (Self : Line_Iterator'Class) return Boolean

Return True when line has lime terminator sequence. Only last line of the text may not have line terminator. This function is independent from the Keep_Terminator mode.

Parameters
Self
Return Value

Line_Iterator

type Line_Iterator is new Abstract_Segment_Iterator with private;

Set_At

procedure Set_At
  (Self            : in out Line_Iterator;
   Position        : VSS.Strings.Cursors.Abstract_Character_Cursor'Class;
   Terminators     : Line_Terminator_Set := New_Line_Function;
   Keep_Terminator : Boolean             := False)

Initialize iterator to point at the line at the given position.

Parameters
Self
Position
Terminators
Keep_Terminator

Set_At_First

procedure Set_At_First
  (Self            : in out Line_Iterator;
   On              : VSS.Strings.Virtual_String'Class;
   Terminators     : Line_Terminator_Set := New_Line_Function;
   Keep_Terminator : Boolean             := False)

Initialize iterator to point to the first line of the given string.

Parameters
Self
On
Terminators
Keep_Terminator

Terminator_First_Character_Index

function Terminator_First_Character_Index
  (Self : Line_Iterator'Class)
   return VSS.Strings.Character_Index

Return index of the first character of the line terminator sequence.

Parameters
Self
Return Value

Terminator_First_Marker

function Terminator_First_Marker
  (Self : Line_Iterator'Class)
   return VSS.Strings.Cursors.Markers.Character_Marker

Return marker of the first character of the line terminator sequence.

Parameters
Self
Return Value

Terminator_First_UTF16_Offset

function Terminator_First_UTF16_Offset
  (Self : Line_Iterator'Class)
   return VSS.Unicode.UTF16_Code_Unit_Index

Return offset of the first UTF-16 code unit of the logical element.

Parameters
Self
Return Value

Terminator_First_UTF8_Offset

function Terminator_First_UTF8_Offset
  (Self : Line_Iterator'Class)
   return VSS.Unicode.UTF8_Code_Unit_Index

Return offset of the first UTF-8 code unit of the line terminator sequence.

Parameters
Self
Return Value

Terminator_Last_Character_Index

function Terminator_Last_Character_Index
  (Self : Line_Iterator'Class)
   return VSS.Strings.Character_Index

Return index of the last character of the line terminator sequence.

Parameters
Self
Return Value

Terminator_Last_Marker

function Terminator_Last_Marker
  (Self : Line_Iterator'Class)
   return VSS.Strings.Cursors.Markers.Character_Marker

Return marker of the last character of the line terminator sequence.

Parameters
Self
Return Value

Terminator_Last_UTF16_Offset

function Terminator_Last_UTF16_Offset
  (Self : Line_Iterator'Class)
   return VSS.Unicode.UTF16_Code_Unit_Index

Return offset of the last UTF-16 code unit of the logical element.

Parameters
Self
Return Value

Terminator_Last_UTF8_Offset

function Terminator_Last_UTF8_Offset
  (Self : Line_Iterator'Class)
   return VSS.Unicode.UTF8_Code_Unit_Index

Return offset of the last UTF-8 code unit of the line terminator sequence.

Parameters
Self
Return Value