VSS.Strings.Cursors.Iterators.Characters

Entities

Tagged Types

Subprograms

Description

Copyright (C) 2020-2023, AdaCore

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

Character_Iterator

type Character_Iterator is new Abstract_Character_Iterator with private;

Element

function Element
  (Self : Character_Iterator'Class)
   return VSS.Characters.Virtual_Character'Base

Return character pointed by iterator. Return invalid value when iterator points outside of the text data.

Parameters
Self
Return Value

Forward

function Forward
  (Self    : in out Character_Iterator;
   Element : out VSS.Characters.Virtual_Character'Base) return Boolean

Moves the iterator one character forward, returning True if the new position points to any character within the string data. The element is set to the value of the new pointing character, or to an invalid character if the new position is outside of the string data.

Parameters
Self
Element
Return Value

Set_After_Last

procedure Set_After_Last
  (Self : in out Character_Iterator;
   On   : VSS.Strings.Virtual_String'Class)

Initialize iterator to point after the last character of the given string.

Parameters
Self
On

Set_At

procedure Set_At
  (Self     : in out Character_Iterator;
   Position : VSS.Strings.Cursors.Abstract_Character_Cursor'Class)

Initialize iterator to point at the character at given position.

Parameters
Self
Position

Set_At_First

procedure Set_At_First
  (Self : in out Character_Iterator;
   On   : VSS.Strings.Virtual_String'Class)

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

Parameters
Self
On

Set_At_Last

procedure Set_At_Last
  (Self : in out Character_Iterator;
   On   : VSS.Strings.Virtual_String'Class)

Initialize iterator to point to the last character of the given string.

Parameters
Self
On

Set_Before_First

procedure Set_Before_First
  (Self : in out Character_Iterator;
   On   : VSS.Strings.Virtual_String'Class)

Initialize iterator to point before the first character of the given string.

Parameters
Self
On