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


This is an inbuilt function function provided 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';

;--- Modify the input string -----------------
#evaluate '' ^say 'MODIFIED = ' || BulkChar2String('AAAA <&> BBBB', 'Conv')^

email me  any feedback, additional information or corrections.
See this page online (look for updates)

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

My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Saturday May 28 2022 at 2:55pm