File longstr.icn

Summary

###########################################################################

	File:     longstr.icn

	Subject:  Procedure to match longest string

	Author:   Jerry Nowlin

	Date:     June 1, 1991

###########################################################################

   This file is in the public domain.

###########################################################################

	Contributors:  Stephen B. Wampler, Kenneth Walker, Bob Alexander,
                      and Richard E. Goerwitz

###########################################################################

	Version:  1.9

###########################################################################

  longstr(l,s,i,j) works like any(), except that instead of taking a
  cset as its first argument, it takes instead a list or set of
  strings (l).  Returns i + *x, where x is the longest string in l
  for which match(x,s,i,j) succeeds.  Fails if no match occurs.

  Defaults:
      s     &subject
      i     &pos if s is defaulted, otherwise 1
      j     0

  Errors:
      The only manual error-checking that is done is to test l to
      be sure it is, in fact, a list or set.  Errors such as non-
      string members in l, and non-integer i/j parameters, are
      caught by the normal Icon built-in string processing and sub-
      scripting mechanisms.

###########################################################################
Procedures:
longstr

This file is part of the (main) package.

Source code.

Details
Procedures:

longstr(l, s, i, j)



This page produced by UniDoc on 2021/04/15 @ 23:59:54.