company logo

PropertyHandle :: GetSubString - Extract substring

The function returns a sub-string from the given text position (starting with 0) in the text area for the property handle. When the property handle refers to a non-text data type, the current property handle value is converted to string before.

To get sub-strings relative to the end of the string, a negative position can be passed to the function, which calculates the position from the end of the string. When the negative position results in a position outside the string area, the function returns an empty string.

When the length passed to the function exceeds the string length, the the remaining portion of the string from the defined position is returned. When passing 0, alsothe remaining length for the string is used. Passing a negative value for length will truncate the string at the end by length characters.

When no instance is selected or when the start position is behind the end of data, the function returns an empty string.

The result is returned in a temporary result buffer and might be destroyed when calling the next property handle function.

Return value:  String object ( NString & )

Implementation details

NString PropertyHandle  :: GetSubString ( int32 start_pos, int32 length )
  • start_pos - Start position in string
  • length - Length

    The length is the size allocated for an instance or area.