Click or drag to resize

StrEvaluate Function

Allows text substitution in strings entered at runtime.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.3b
Syntax
 FUNCTION StrEvaluate(
	cString AS STRING
) AS STRING
View Source

Parameters

cString
Type: String
A string containing one or more macro variables to expand.

Return Value

Type: String
The new string, after all macro substitutions have taken place.
Remarks
Examples
This example demonstrates StrEvaluate() on a string entered at runtime that contains a macro variable:
X#
1MEMVAR cOne
2LOCAL cTwo AS STRING
3cOne := "world"
4ACCEPT "Enter a macro string " TO cTwo
5// If you type "Hello &cOne" (without quotes)
6? cTwo                        // Result: "Hello &cOne"
7? StrEvaluate(cTwo)            // Result: "Hello world"
See Also