Manual:DIL Manual/string in stringlist

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 22:35, 4 December 2025 by Nove (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

string 'in' stringlist
   Argument 1: A string to find.
   Argument 2: A stringlist to search.
   Returns: 1.. if first string is found in stringlist, or 0 if it is
            non existent. If found the number equals the index of the
            string found plus one.
Example 1:
  s := "c";
  sl :=
  i := s in sl;
  The result of 'i' is 3, and sl.[i-1] equals "c" (s).
Example 2:

   dilbegin foo();
   code
dilend
---~---~---~---~---~---~---~---~---

string 'in' stringlist
   Argument 1: A string to find.
   Argument 2: A stringlist to search.
   Returns: 1.. if first string is found in stringlist, or 0 if it is
            non existent. If found the number equals the index of the
            string found plus one.
Example 1:
  s := "c";
  sl :=
  i := s in sl;
  The result of 'i' is 3, and sl.[i-1] equals "c" (s).
Example 2:

   dilbegin foo();
   code
dilend
---~---~---~---~---~---~---~---~---