Okapi .NET Library

IFilterItem.ChangeToCode Method 

 [This is preliminary documentation and subject to change.]

Change a text section of a a text item to inline code.

[Visual Basic]
Function ChangeToCode( _ 
   ByVal p_nStart As Integer, _ 
   ByVal p_nCodeIndex As Integer, _ 
   ByVal p_nCodeLength As Integer, _ 
   ByVal p_nTextIndex As Integer, _ 
   ByVal p_nTextLength As Integer _ 
) As Integer
[C#]
int ChangeToCode(
   int p_nStart,
   int p_nCodeIndex,
   int p_nCodeLength,
   int p_nTextIndex,
   int p_nTextLength
);
[C++]
int ChangeToCode(
   int p_nStart,
   int p_nCodeIndex,
   int p_nCodeLength,
   int p_nTextIndex,
   int p_nTextLength
);
[JScript]
function ChangeToCode(
   int p_nStart,
   int p_nCodeIndex,
   int p_nCodeLength,
   int p_nTextIndex,
   int p_nTextLength
): int;

Parameters

p_nStart
Adjusted start position of the code in the coded text. This is the same value as p_nCodeIndex if no adjustment is needed.
p_nCodeIndex
Start of the code in the original coded text.
p_nCodeLength
Length of the code.
p_nTextIndex
Start of the text embedded in the code, or -1 if there is no embedded text.
p_nTextLength
Length of the text embedded in the code, or 0 if there is no embedded text.

Return Value

The length difference of the coded text between before and after the insertion.

Remarks

Use this method to insert a code within a text item.

The code may include a run of text. In that case you must set p_nTextIndex to the starting position of the text, and p_nTextLength to the length of the text. If there is no text in the code p_nTextIndex must be set to -1 and/or p_nTextLength to 0.

See Also

IFilterItem Interface | Okapi.Library.Filter Namespace