ClassesClassesClassesClasses | | | | Operators

tuple_strstrtuple_strstrTupleStrstrtuple_strstrTupleStrstrTupleStrstr (Operator)


tuple_strstrtuple_strstrTupleStrstrtuple_strstrTupleStrstrTupleStrstr — Forward search for strings within a string tuple.


tuple_strstr( : : String, ToFind : Position)

Herror tuple_strstr(const char* String, const char* ToFind, Hlong* Position)

Herror T_tuple_strstr(const Htuple String, const Htuple ToFind, Htuple* Position)

Herror tuple_strstr(const HTuple& String, const HTuple& ToFind, Hlong* Position)

Herror tuple_strstr(const HTuple& String, const HTuple& ToFind, HTuple* Position)

void TupleStrstr(const HTuple& String, const HTuple& ToFind, HTuple* Position)

HTuple HTuple::TupleStrstr(const HTuple& ToFind) const

void HOperatorSetX.TupleStrstr(
[in] VARIANT String, [in] VARIANT ToFind, [out] VARIANT* Position)

VARIANT HTupleX.TupleStrstr(
[in] VARIANT String, [in] VARIANT ToFind)

static void HOperatorSet.TupleStrstr(HTuple stringVal, HTuple toFind, out HTuple position)

HTuple HTuple.TupleStrstr(HTuple toFind)


tuple_strstrtuple_strstrTupleStrstrtuple_strstrTupleStrstrTupleStrstr searches within the strings of the input tuple StringStringStringStringStringstringVal for the strings of the input tuple ToFindToFindToFindToFindToFindtoFind. Both input tuples may only consist of strings. Otherwise tuple_strstrtuple_strstrTupleStrstrtuple_strstrTupleStrstrTupleStrstr returns an error. If StringStringStringStringStringstringVal contains only one string, all strings of ToFindToFindToFindToFindToFindtoFind are searched in it. Thus, the output tuple consists of as many elements as ToFindToFindToFindToFindToFindtoFind. Whenever a searched string has been found, the position of its first occurrence gets stored in the output tuple PositionPositionPositionPositionPositionposition (positions in strings are counted starting with 0). If a string can not be found, -1 will be returned instead of its position. If both input tuples show the same number of elements, the strings are searched elementwise. I.e., the first string of ToFindToFindToFindToFindToFindtoFind is searched within the first string of StringStringStringStringStringstringVal, the second string of ToFindToFindToFindToFindToFindtoFind is searched within the second string of StringStringStringStringStringstringVal and so on. The results of the elementwise searches are returned with PositionPositionPositionPositionPositionposition that contains as many elements as StringStringStringStringStringstringVal and ToFindToFindToFindToFindToFindtoFind. If ToFindToFindToFindToFindToFindtoFind only contains one string, this is searched within all strings of StringStringStringStringStringstringVal. Thus, in this case PositionPositionPositionPositionPositionposition consists of as many elements as StringStringStringStringStringstringVal. If both input tuples contain more than one element and the number of elements differs for the input tuples, tuple_strstrtuple_strstrTupleStrstrtuple_strstrTupleStrstrTupleStrstr returns an error.

For general information about string operations see Tuple / String Operations.

Exception: Empty input tuples

If either or both of the input tuples are empty, the operator returns an empty tuple.

HDevelop In-line Operation

HDevelop provides an in-line operation for tuple_strstrtuple_strstrTupleStrstrtuple_strstrTupleStrstrTupleStrstr, which can be used in an expression in the following syntax:

Position := strstr(String, ToFind)



StringStringStringStringStringstringVal (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Input tuple with string(s) to examine.

ToFindToFindToFindToFindToFindtoFind (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Input tuple with string(s) to search.

PositionPositionPositionPositionPositionposition (output_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Position of searched string(s) within the examined string(s).


tuple_strrstrtuple_strrstrTupleStrrstrtuple_strrstrTupleStrrstrTupleStrrstr, tuple_strlentuple_strlenTupleStrlentuple_strlenTupleStrlenTupleStrlen, tuple_strchrtuple_strchrTupleStrchrtuple_strchrTupleStrchrTupleStrchr, tuple_strrchrtuple_strrchrTupleStrrchrtuple_strrchrTupleStrrchrTupleStrrchr, tuple_substrtuple_substrTupleSubstrtuple_substrTupleSubstrTupleSubstr, tuple_str_first_ntuple_str_first_nTupleStrFirstNtuple_str_first_nTupleStrFirstNTupleStrFirstN, tuple_str_last_ntuple_str_last_nTupleStrLastNtuple_str_last_nTupleStrLastNTupleStrLastN, tuple_splittuple_splitTupleSplittuple_splitTupleSplitTupleSplit, tuple_environmenttuple_environmentTupleEnvironmenttuple_environmentTupleEnvironmentTupleEnvironment



ClassesClassesClassesClasses | | | | Operators