<-- Previous || Up || Next -->

Add Replacement Function
Units Class

Public Function AddReplacement( _
      ByVal vFind As String _
    , ByVal vReplace As String _
    , ByVal vCompare As VbCompareMethod _
    ) As String

"Add Replacement Definition" Add a global text replacement definition. Defines text which will be replaced by something else wherever it occurs within measurement expressions. Function returns an empty string upon success. Function returns the error message as a string when errors occur.

Arguments: vFind is this string which will be replaced by something else wherever it occurs within measurement expressions. vReplace is the text which will replace every occurrence of vFind. vCompare is the Visual Basic comparison type used to find text that matches vFind.
Return Value: Function returns an empty string upon success. It returns the error message as a string when errors occur within the function.
If there is already a global text replacement definition whose Find text is the same as vFind, that previous definition will be overwritten by the new one.
Example:
    estConvertAddReplacement("feet", "foot", 1)
defines "foot" as the text that will replace "feet" wherever "feet" appears within measurement expressions. For example, the measurement expression "acrefeet/hr" would be changed to "acrefoot/hr" before being interpreted.
See Also:
    estConvertAddUnit Function
    estConvertAddPrefix Function

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.