5 #ifndef CVMFS_UTIL_STRING_H_
6 #define CVMFS_UTIL_STRING_H_
23 #ifdef CVMFS_NAMESPACE_GUARD
24 namespace CVMFS_NAMESPACE_GUARD {
45 uint64_t *a, uint64_t *b);
47 const bool ignore_case);
49 const bool ignore_case);
52 unsigned max_chunks,
const std::string &str,
char delim);
57 const std::string &joint);
59 const unsigned buffer_size,
60 std::map<char, std::string> *content);
62 std::map<char, std::string> *content);
68 bool trim_newline =
false);
70 const std::string& toTrim,
75 const std::string &needle,
76 const std::string &replace_by);
77 CVMFS_EXPORT std::string
Tail(
const std::string &source,
unsigned num_lines);
83 const std::string &
format =
"%Y-%m-%d %H:%M:%S");
85 #ifdef CVMFS_NAMESPACE_GUARD
89 #endif // CVMFS_UTIL_STRING_H_
string GetLineMem(const char *text, const int text_size)
std::string GetGMTimestamp(const std::string &format)
string StringifyLocalTime(const time_t seconds)
std::string IsoTimestamp()
string Trim(const string &raw, bool trim_newline)
string ReplaceAll(const string &haystack, const string &needle, const string &replace_by)
string JoinStrings(const vector< string > &strings, const string &joint)
string Tail(const string &source, unsigned num_lines)
string StringifyTime(const time_t seconds, const bool utc)
string StringifyDouble(const double value)
std::string StringifyUint(const uint64_t value)
bool Debase64(const string &data, string *decoded)
string StringifyByteAsHex(const unsigned char value)
string StringifyBool(const bool value)
bool String2Uint64Parse(const std::string &value, uint64_t *result)
string Base64Url(const string &data)
std::string RfcTimestamp()
int64_t String2Int64(const string &value)
bool GetLineFile(FILE *f, std::string *line)
string ToUpper(const string &mixed_case)
vector< string > SplitString(const string &str, char delim)
bool HasSuffix(const std::string &str, const std::string &suffix, const bool ignore_case)
std::string WhitelistTimestamp(time_t when)
vector< string > SplitStringBounded(unsigned max_chunks, const string &str, char delim)
string StringifyInt(const int64_t value)
bool HasPrefix(const string &str, const string &prefix, const bool ignore_case)
const int const char * format
time_t IsoTimestamp2UtcTime(const std::string &iso8601)
bool GetLineFd(const int fd, std::string *line)
string Base64(const string &data)
uint64_t String2Uint64(const string &value)
bool ParseKeyvalPath(const string &filename, map< char, string > *content)
std::string TrimString(const std::string &path, const std::string &toTrim, const int trimMode)
string StringifyTimeval(const timeval value)
void ParseKeyvalMem(const unsigned char *buffer, const unsigned buffer_size, map< char, string > *content)
void String2Uint64Pair(const string &value, uint64_t *a, uint64_t *b)