Listing 8 An extract from the stlsoft::char_traits class
/* /////////////////////////////////////////////////////////////
* ...
*
* Extract from stlsoft_char_traits.h
*
* Copyright (C) 2002, Synesis Software Pty Ltd.
* (Licensed under the Synesis Software Standard Source License:
* http://www.synesis.com.au/licenses/ssssl.html)
*
* ...
* ////////////////////////////////////////////////////////// */
static char_type const *find( char_type const *s,
size_type cch,
char_type const &c)
{
for(; 0 < cch; --cch, ++s)
{
if(eq(*s, c))
{
break;
}
}
return (0 < cch) ? s : NULL;
}