algorithms/ findif.bi | |
License | Copyright © 2009, FreeBASIC Extended Library Development Group |
Functions | |
FindIf | Finds the first element in the range [//first//, //last//) that satisfies a predicate //pred//. |
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 FindIf overload ( byval first as fbext_TypeName(T_) ptr, byval last as fbext_TypeName(T_) ptr, byval pred as function ( byref as const fbext_TypeName(T_) ) as bool ) as fbext_TypeName(T_) ptr
Finds the first element in the range [//first//, //last//) that satisfies a predicate //pred//.
first | A pointer to the first element in the range. |
last | A pointer to one-past the last element in the range. |
pred | The predicate to test elements. |
Returns a pointer to the element, or last if no such element is found.
Finds the first element in the range [//first//, //last//) that satisfies a predicate //pred//.
declare function FindIf overload ( byval first as fbext_TypeName(T_) ptr, byval last as fbext_TypeName(T_) ptr, byval pred as function ( byref as const fbext_TypeName(T_) ) as bool ) as fbext_TypeName(T_) ptr