You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Compatible Unicode Intrinsic Functions - TrimSubstitute Method
Embed strings at specific substitution points (&1 &2 etc) trimming trailing blanks
Member of Compatible Unicode Intrinsic Functions (PRIM_LIBI.ICompatibleUnicodeIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

Unicode String

Resulting string

String1

*Input (Optional)

Unicode String

String to be embedded

String2

*Input (Optional)

Unicode String

String to be embedded

String3

*Input (Optional)

Unicode String

String to be embedded

String4

*Input (Optional)

Unicode String

String to be embedded

String5

*Input (Optional)

Unicode String

String to be embedded

String6

*Input (Optional)

Unicode String

String to be embedded

String7

*Input (Optional)

Unicode String

String to be embedded

String8

*Input (Optional)

Unicode String

String to be embedded

String9

*Input (Optional)

Unicode String

String to be embedded

Details


TrimSubstitute allows you to replace text at a series of predetermined points in a string, identified by &1 to &9, trimming all trailing blanks.

Example


In this example, *MtxtCust01 is a multilingual variable containing "&1 &2 has a limit of $&3"
#Givename, #Surname and #Limit have values of 'Veronica ', 'Brown ' and '2000' respectively.
The result at run time would be "Veronica Brown has a limit of $2000"
#Com_owner.caption := *MtxtCust01.Substitute(#Givename #Surname #Limit.AsString)
If two ampersands appear together in a string, they are reduced to a single ampersand and not considered for substitution.
In this example, #string will equal "a&2"
#string := ("&1&&2").TrimSubstitute( "a " "b " )

See also

All Component Classes
Technical Reference

  • No labels