A Bevy of BIFs: %XLATE and %REPLACE
March 4, 2009 Jon Paris
The %XLATE and %REPLACE text replacement built-in functions (BIFs) are often confused, and part of that confusion may be the result of wishful thinking on the part of RPGers frustrated with the limitations of %XLATE. Just as with the %SCAN and %CHECK BIFs that I discussed in an earlier tip, the major difference between %XLATE and %REPLACE is that %XLATE operates on individual characters and %REPLACE operates on strings. Before we study %REPLACE, let’s quickly review the function of %XLATE. %XLATE( from : to : input {: startpos} ) The function of %XLATE is to search the input string |