algorithms/ count.bi

Summary
algorithms/ count.bi
LicenseCopyright © 2009, FreeBASIC Extended Library Development Group
Functions
CountFinds the number of elements in the range [first, last) that are equal to 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

Count

declare function Count overload (
   byval first as fbext_TypeName(T_) ptr,
   byval last as fbext_TypeName(T_) ptr,
   byref x as const fbext_TypeName(T_)
) as ext.SizeType

Finds the number of elements in the range [first, last) that are equal to a value x.

Parameters

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

Returns

Returns the number of found elements, or zero (0) if no such elements are found.

declare function Count overload (
   byval first as fbext_TypeName(T_) ptr,
   byval last as fbext_TypeName(T_) ptr,
   byref x as const fbext_TypeName(T_)
) as ext.SizeType
Finds the number of elements in the range [first, last) that are equal to a value x.