#include <cupt/common.hpp>
#include <cupt/stringrange.hpp>
Go to the source code of this file.
◆ checkPackageName()
bool cupt::checkPackageName |
( |
StringRange |
packageName, |
|
|
bool |
throwOnError = true |
|
) |
| |
checks package name for correctness
- Parameters
-
packageName | package name |
throwOnError | if set to true , function will throw exception if packageName is not correct |
- Returns
true
if the packageName is correct, false
if packageName is not correct and throwOnError is false
◆ consumePackageName()
void cupt::consumePackageName |
( |
const char * |
begin, |
|
|
const char * |
end, |
|
|
const char *& |
resultEnd |
|
) |
| |
reads package name in range
Tries to read as more characters as possible from the begin, which form a valid package name, until end.
- Parameters
-
| begin | range begin iterator |
| end | range end iterator |
[in,out] | resultEnd | consumed range end iterator |
- Example:
string input = "zzuf (>= 1.2)";
string::const_iterator resultEnd;
cout << string(input.begin(), resultEnd) << endl;
"zzuf"
will be printed