
process_string(3)     LPC Library Functions     process_string(3)

NNAAMMEE
       process_string()  -  give  a  string with replaced callde       scriptions

SSYYNNOOPPSSIISS
       string process_string( string combinestring );

DDEESSCCRRIIPPTTIIOONN
       Processes a string by replacing  specific  syntactic  pat       terns  with  what  is  returned when the pattern is inter       preted as a function call description.

       The syntactic patterns are on the form:

                "@@function[:filename][|arg1|arg2....|argN]@@"

       This is interpreted as a call:

                 filename->function(arg1, arg2, ....., argN)

       Note that process_string does not  recurse  over  returned
       replacement  values. If a function returns another syntac       tic pattern, that description will not be replaced.

       All such occurrences in 'combinestring' is  processed  and
       replaced  if  the  return value is a string. If the return
       value is not a string the pattern will remain  unreplaced.

       Note  that  both  object and arguments are marked optional
       with the brackets and that the brackets are  not  included
       in the actual pattern.

SSEEEE AALLSSOO
       process_value(3)

CCAAVVEEAATT
       This  is  usually used to support 'value by function call'
       in the mudlib.  It is wise to set  the  effuserid  of  the
       object  to 0 before using process_value as any function in
       any object can be called with almost any arguments.

EEXXAAMMPPLLEE
       A string:
           "You are chased by @@query_the_name:/obj/monster#123@@ eastward."

       is replaced by:
           "You are chased by the orc eastward."

       Assuming that query_the_name in monster#123 returns "the orc".

Majik                      26 Jul 1997                          1

process_string(3)     LPC Library Functions     process_string(3)

Majik                      26 Jul 1997                          2

