OGR
|
Convenient string class based on std::string. More...
#include <cpl_string.h>
Public Member Functions | |
CPLString & | FormatC (double dfValue, const char *pszFormat=0) |
CPLString & | Trim () |
size_t | ifind (const std::string &str, size_t pos=0) const |
size_t | ifind (const char *s, size_t pos=0) const |
CPLString & | toupper (void) |
CPLString & | tolower (void) |
Convenient string class based on std::string.
CPLString & CPLString::FormatC | ( | double | dfValue, |
const char * | pszFormat = 0 |
||
) |
Format double in C locale.
The passed value is formatted using the C locale (period as decimal seperator) and appended to the target CPLString.
dfValue | the value to format. |
pszFormat | the sprintf() style format to use or omit for default. Note that this format string should only include one substitution argument and it must be for a double (f or g). |
size_t CPLString::ifind | ( | const std::string & | str, |
size_t | pos = 0 |
||
) | const |
Case insensitive find() alternative.
str | substring to find. |
pos | offset in the string at which the search starts. |
Referenced by CPLURLAddKVP(), and CPLURLGetValue().
size_t CPLString::ifind | ( | const char * | s, |
size_t | nPos = 0 |
||
) | const |
Case insensitive find() alternative.
s | substring to find. |
nPos | offset in the string at which the search starts. |
References tolower().
CPLString & CPLString::toupper | ( | void | ) |
Convert to upper case in place.
CPLString & CPLString::Trim | ( | ) |
Trim white space.
Trims white space off the let and right of the string. White space is any of a space, a tab, a newline ('
') or a carriage control ('').
References CPLRecode().