2.1.2.4 find_any_of_characters_in_str


Description

find any one of the specified characters in a string and return its pointer

Syntax

LPSTR find_any_of_characters_in_str( LPCSTR lpcsz, LPCSTR lpcszCharList, BOOL bIgnoreQuoted = false )

Parameters

lpcsz
[input] string to search
lpcszCharList
[input] character list as a string
bIgnoreQuoted
[input] true will ignore those inside () [] {} "", false will consider any type of quote parenthesis

Return

NULL if none can be found, otherwise pointer location of the 1st found character

Examples

EX1

void find_any_of_characters_in_str_ex1()
{   bool bSkipInsideParenthsis = false;
    string str = "test (abc@efg.com)";
    LPSTR lpsz = find_any_of_characters_in_str(str, "@.", bSkipInsideParenthsis);
    if(lpsz)
        out_str(lpsz);
    else
        out_str("not found");
}

Remark

See Also

Header to Included

origin.h

Reference