PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: BreakAt()[Next]: BulkChangePrepare()

BulkChar2String()

This is a rexx function provided by PPWIZARD. This routine (like all PPWIZARD extensions) can be used with any operating system supported by PPWIZARD.

This function is used to convert a whole series of single characters into strings. To convert single characters to other single characters you would of course use the rexx translate() routine.

This function takes 2 parameters as follows:

  1. The name of the source string.

  2. The name of a rexx variable which lists each of the characters (in order) which you wish to convert. For each character in this string an element in the array of the same name contains what it should be converted to. The BulkChangePrepare() routine can be used to simplify the creation of the change information.

The routine returns the possibly modified source string.

When this routine returns the rexx variable ReplaceCount will have been incremented by the number of replacements made.

Silly Example

    ;--- Set up the conversion information ------
    #DefineRexx ""
       call BulkChangePrepare "Conv";                 ;;Initialize to empty
       call BulkChangePrepare "Conv", '&', '&';
       call BulkChangePrepare "Conv", '<', '&lt';
       call BulkChangePrepare "Conv", '>', '&gt';
    #DefineRexx
    
    ;--- Modify the input string -----------------
    #evaluate '' ^say 'MODIFIED = ' || BulkChar2String('AAAA <&> BBBB', 'Conv')^
    


[Top][Contents][Search][Prev]: BreakAt()[Next]: BulkChangePrepare()

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Thursday January 17 2002 at 6:27pm