FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
fo
namespace holds the FOSSology library functions.
More...
Classes | |
class | File |
Class to handle file related operations. More... | |
class | AgentDatabaseHandler |
Database handler for agents. More... | |
class | DbManagerStructDeleter |
DB manager deleter (for shared pointer) More... | |
class | DbManager |
DB wrapper for agents. More... | |
class | PGresultDeleter |
PGresult deleter (for shared pointer) More... | |
class | QueryResult |
Wrapper for DB result. More... | |
Functions | |
std::string | getStringFromFile (const char *filename, const unsigned long int maximumBytes) |
Reads the content of a file and return it as a string. More... | |
std::string | getStringFromFile (std::string const &filename, const unsigned long int maximumBytes) |
unsigned long | stringToUnsignedLong (const char *string) |
bool | stringToBool (const char *string) |
icu::UnicodeString | recodeToUnicode (const std::string &input) |
fo
namespace holds the FOSSology library functions.
std::string fo::getStringFromFile | ( | const char * | filename, |
const unsigned long int | maximumBytes | ||
) |
Reads the content of a file and return it as a string.
Read the content of the file defined by the filename. Function also limits the length of the file content by using maximumBytes.
filename | Path of the file to read. |
maximumBytes | Maximum length to read (set -1 to read full length). |
std::string fo::getStringFromFile | ( | std::string const & | filename, |
const unsigned long int | maximumBytes | ||
) |
icu::UnicodeString fo::recodeToUnicode | ( | const std::string & | input | ) |
Remove all non-UTF8 characters from a string.
input | The string to be recoded |
Definition at line 46 of file libfossUtils.cc.
bool fo::stringToBool | ( | const char * | str | ) |
Translates a string to boolean type.
str | String to be translated |
Definition at line 32 of file libfossUtils.cc.
unsigned long fo::stringToUnsignedLong | ( | const char * | string | ) |
Translates a string to unsigned long type.
string | String to be translated |
Definition at line 20 of file libfossUtils.cc.