My favorites | Sign in
Project Home Wiki
Search
for
Examples  

Featured
Updated Aug 7, 2009 by steve.lavietes@gmail.com

Converting a space-delimited list into a comma-delimited list

std::string inputString = "   the quick     brown  taco crunches";
std::vector<std::string> tokens;
pystring::split(inputString, tokens);
std::string outputString = pystring::join(",", tokens);

The result is "the,quick,brown,taco,crunches".

Crude file extension checking

std::string filename = "finalframe.0101.exr";
if ( pystring::endswith( pystring::lower( filename ), ".exr" ) )
{
    assetValid = true;
}
else
{
    assetValid = false;
    FailedAssetWarning();
}

Sign in to add a comment
Powered by Google Project Hosting