[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'LazStringUtils' (#lazutils)

FindNextDelimitedItem

Finds the next occurrence of a specific value in a delimited list.

Declaration

Source position: lazstringutils.pas line 86

function FindNextDelimitedItem(

  const List: string;

  Delimiter: Char;

  var Position: Integer;

  FindItem: string

):string;

Arguments

List

  

List with delimited values examined in the routine.

Delimiter

  

Character used to separate values in the list.

Position

  

Starting position for the values examined in the routine.

FindItem

  

Item value to locate in List.

Function result

The value in FindItem when found, or an empty string.

Description

FindNextDelimitedItem is a String function used to find the next occurrence of a specific value in a delimited list of values.

List is the list with the delimited values searched in the routine.

Delimiter is the character used to separate the values in List.

Position is a variable parameter with the character index in List where the find operation is started. Position is 1-based, like using indexed access to the values in a String.

FindItem is the value to locate in List starting at the given position.

FindNextDelimitedItem calls the GetNextDelimitedItem routine to get the individual delimited values in List. GetNextDelimitedItem updates the value in Position when an item is retrieved. The value in Position is set to Len(List)+1 if FindItem is not found in the routine.

The return value is set to the value in FindItem if it is found in List. The return value is an empty string ('') if FindItem is not found in the List starting at the given position.

See also

GetNextDelimitedItem

  

Gets the next delimited value in List starting at the specified position.


Version 4.0 Generated 2025-05-03 Home