PalStrMultiSubstitute

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalString PalStrMultiSubstitute( SalString sValues,
		                   SalString sPrefix,
		                   SalString sSource )

The PalStrMultiSubstitute method should be used, when there is a need to substitute a range of values.

Parameters

Name Description
SalString sValues Comma separated string of replacement values.
SalString sPrefix The default prefix &P[1..x] can throughout this parameter be changed.
SalString sSource The source string to substitute values in.
 

Returns

The return value is the modified string.

Comments

The method will default substitute &P[1..x] labels in the string. If this prefix may collide with any of your other text, the sPrefix parameter should be supplied with a working prefix.

Example

! This function can be used to remove a lot of redundant source code.
Call DbPLSQLBlock( c_hSql, PalStrMultiSubstitute( 
   ':i_hWndForm.frmDemoOrder.tblDemoOrderItem', strNULL, 
   'Begin
       DEMO_ORDER_API.Get_Name( &P1.CompanyId, &P1.OrderId )
    End;' 
..
Set sStr = PalStrMultiSubstitute( 'Long text1,Long text2,
         Long text3,strNULL, ' ....  &P1 ... &P2 ... &P3 + &P3 ... ' )
C# code
sDays = Int.PalStrMultiSubstitute(Vis.StrSubstitute(sDescription, ";", ","),
Const.strNULL, sNewDesc);