algorithms/ find.bi

Summary
algorithms/ find.bi
LicenseCopyright © 2009, FreeBASIC Extended Library Development Group
Functions
FindFinds the first element in the range [first, last) that matches a value x.

License

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

Functions

Find

declare function Find overload (
   byval first as const fbext_TypeName(T_) ptr,
   byval last as const fbext_TypeName(T_) ptr,
   byref x as const fbext_TypeName(T_)
) as const fbext_TypeName(T_) ptr

Finds the first element in the range [first, last) that matches a value x.

Parameters

firstA pointer to the first element in the range.
lastA pointer to one-past the last element in the range.
xThe value to find.

Returns

Returns a pointer to the element, or //last// if no such element is found.

declare function Find overload (
   byval first as const fbext_TypeName(T_) ptr,
   byval last as const fbext_TypeName(T_) ptr,
   byref x as const fbext_TypeName(T_)
) as const fbext_TypeName(T_) ptr
Finds the first element in the range [first, last) that matches a value x.