Function CharTypeStringFindFirstOf


#include <include/EASTL/string.h>

static const value_type * CharTypeStringFindFirstOf(const value_type *p1Begin, const value_type *p1End, const value_type *p2Begin, const value_type *p2End)


CharTypeStringFindFirstOf Specialized value_type version of STL find_first_of() function. This function is much like the C runtime strtok function, except the strings aren't null-terminated.


Lines 3520-3534 in include/EASTL/string.h. Line 785 in include/EASTL/string.h.

template <typename T, typename Allocator>
const typename basic_string<T, Allocator>::value_type*
basic_string<T, Allocator>::CharTypeStringFindFirstOf(const value_type* p1Begin, const value_type* p1End,
                                                      const value_type* p2Begin, const value_type* p2End)
    for( ; p1Begin != p1End; ++p1Begin)
        for(const value_type* pTemp = p2Begin; pTemp != p2End; ++pTemp)
            if(*p1Begin == *pTemp)
                return p1Begin;
    return p1End;

Add Discussion as Guest

Log in