osgEarth 2.1.1
|
Functions | |
std::string | getOGRAttrValue (void *_handle, const std::string &name, int child_num, bool lowercase=false) |
std::string & | replaceIn (std::string &s, const std::string &sub, const std::string &other) |
std::string anonymous_namespace{SpatialReference.cpp}::getOGRAttrValue | ( | void * | _handle, |
const std::string & | name, | ||
int | child_num, | ||
bool | lowercase = false |
||
) |
Definition at line 42 of file SpatialReference.cpp.
{ GDAL_SCOPED_LOCK; const char* val = OSRGetAttrValue( _handle, name.c_str(), child_num ); if ( val ) { std::string t = val; if ( lowercase ) { std::transform( t.begin(), t.end(), t.begin(), ::tolower ); } return t; } return ""; }
std::string& anonymous_namespace{SpatialReference.cpp}::replaceIn | ( | std::string & | s, |
const std::string & | sub, | ||
const std::string & | other | ||
) |
Definition at line 59 of file SpatialReference.cpp.
{ if ( sub.empty() ) return s; size_t b=0; for( ; ; ) { b = s.find( sub, b ); if ( b == s.npos ) break; s.replace( b, sub.size(), other ); b += other.size(); } return s; }