THE META-HTML LANGUAGE REFERENCE MANUAL

[TOC]

Manual Page Viewer

Name: ARRAY-MEMBER

Section: Arrays


Synopsis:

    <array-member ITEM ARRAYVAR &key [CASELESS=TRUE] [COMPARE=FUNC]

Description:

    Look up (and return) the index of ITEM in the contents of the array referenced by ARRAYVAR.

    If ITEM is not found, then array-member returns the empty string.

    If CASELESS is non-empty, then the comparison is done without regard to character case. Otherwise, character case is significant in the location of the item.

    If a function name is passed, as in COMPARE=FUNC, it should be the name of a function which receives two required arguments -- the item that is to be looked for, and an element of the array that this item is to be compared against, and an optional keyword argument of "caseless". If the function returns a non-empty string, then this item is considered a match.

    By default, string comparison is done on the elements.

    <set-var array[] =
      <prog
         this
         another
         multi word
         thing>>
    <array-member "multi word" array>
    produces:
    2

Edit Pointer
Function Index
Variable Index
Variable Editor


The META-HTML Reference Manual V2.0 Copyright © 1995, 1998, Brian J. Fox
Found a bug? Send mail to bug-manual@metahtml.org