#include <iostream>
#include <string>

int main()
{
    {
        const std::string str = "Random irrelevent text here $500.22+$200.33 More random $irrelevent text$" ;
        std::cout << str << "\n    character '$' found at positions: " ;
        std::string::size_type pos = str.find( '$' ) ;
        while( pos != std::string::npos )
        {
            std::cout << pos << ' ' ;
            pos = str.find( '$', pos+1 ) ;
        }
    }

    {
        const std::string str = "\n\nRandom text here 50-people more random text" ;
        std::cout << str << "\n    substring '50-people' found starting at position: "
                  << str.find( "50-people" ) << '\n' ;
        if( str.find( '$' ) == std::string::npos ) std::cout << "    character '$' was not found\n" ;
    }
}
