algorithms/ findfirstof.bi | |
License | Copyright © 2009, FreeBASIC Extended Library Development Group |
Functions | |
FindFirstOf | Finds the first occurance of an element in the range [//first1//, //last1//) equal to any one of the elements in the range [//first2//, //last2//). |
FindFirstOf | Finds the first occurance of an element in the range [//first1//, //last1//) that satisfies a predicate //pred// with any one of the elements in the range [//first2//, //last2//). |
Copyright © 2009, FreeBASIC Extended Library Development Group
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License
declare function FindFirstOf overload ( byval first1 as fbext_TypeName(T_) ptr, byval last1 as fbext_TypeName(T_) ptr, byval first2 as fbext_TypeName(T_) ptr, byval last2 as fbext_TypeName(T_) ptr ) as fbext_TypeName(T_) ptr
Finds the first occurance of an element in the range [//first1//, //last1//) equal to any one of the elements in the range [//first2//, //last2//).
first1 | A pointer to the first element in the range to search. |
last1 | A pointer to one-past the last element in the range to search. |
first2 | A pointer to the first elements in the range to search for. |
last2 | A pointer to one-past the last element in the range to search for. |
Returns a pointer to the element, or //last1// if no such element is found.
declare function FindFirstOf overload ( byval first1 as fbext_TypeName(T_) ptr, byval last1 as fbext_TypeName(T_) ptr, byval first2 as fbext_TypeName(T_) ptr, byval last2 as fbext_TypeName(T_) ptr, byval pred as function ( byref as const fbext_TypeName(T_), byref as const fbext_TypeName(T_) ) as bool ) as fbext_TypeName(T_) ptr
Finds the first occurance of an element in the range [//first1//, //last1//) that satisfies a predicate //pred// with any one of the elements in the range [//first2//, //last2//).
first1 | A pointer to the first element in the range to search. |
last1 | A pointer to one-past the last element in the range to search. |
first2 | A pointer to the first elements in the range to search for. |
last2 | A pointer to one-past the last element in the range to search for. |
pred | The predicate to test elements with. |
Returns a pointer to the element, or //last1// if no such element is found.
Finds the first occurance of an element in the range [//first1//, //last1//) equal to any one of the elements in the range [//first2//, //last2//).
declare function FindFirstOf overload ( byval first1 as fbext_TypeName(T_) ptr, byval last1 as fbext_TypeName(T_) ptr, byval first2 as fbext_TypeName(T_) ptr, byval last2 as fbext_TypeName(T_) ptr ) as fbext_TypeName(T_) ptr