CernVM-FS
2.12.0
|
#include "string.h"
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdint.h>
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <string>
Go to the source code of this file.
Classes | |
struct | anonymous_namespace{string.cc}::IgnoreCaseComperator |
Namespaces | |
anonymous_namespace{string.cc} | |
Macros | |
#define | __STDC_FORMAT_MACROS |
Functions | |
string | StringifyBool (const bool value) |
string | StringifyInt (const int64_t value) |
std::string | StringifyUint (const uint64_t value) |
string | StringifyByteAsHex (const unsigned char value) |
string | StringifyDouble (const double value) |
string | StringifyTime (const time_t seconds, const bool utc) |
string | StringifyLocalTime (const time_t seconds) |
std::string | RfcTimestamp () |
std::string | IsoTimestamp () |
std::string | WhitelistTimestamp (time_t when) |
string | StringifyTimeval (const timeval value) |
time_t | IsoTimestamp2UtcTime (const std::string &iso8601) |
int64_t | String2Int64 (const string &value) |
uint64_t | String2Uint64 (const string &value) |
bool | String2Uint64Parse (const std::string &value, uint64_t *result) |
void | String2Uint64Pair (const string &value, uint64_t *a, uint64_t *b) |
bool | HasPrefix (const string &str, const string &prefix, const bool ignore_case) |
bool | HasSuffix (const std::string &str, const std::string &suffix, const bool ignore_case) |
vector< string > | SplitString (const string &str, char delim) |
vector< string > | SplitStringBounded (unsigned max_chunks, const string &str, char delim) |
string | JoinStrings (const vector< string > &strings, const string &joint) |
void | ParseKeyvalMem (const unsigned char *buffer, const unsigned buffer_size, map< char, string > *content) |
bool | ParseKeyvalPath (const string &filename, map< char, string > *content) |
string | GetLineMem (const char *text, const int text_size) |
bool | GetLineFile (FILE *f, std::string *line) |
bool | GetLineFd (const int fd, std::string *line) |
string | Trim (const string &raw, bool trim_newline) |
std::string | TrimString (const std::string &path, const std::string &toTrim, const int trimMode) |
string | ToUpper (const string &mixed_case) |
string | ReplaceAll (const string &haystack, const string &needle, const string &replace_by) |
static void | Base64Block (const unsigned char input[3], const char *table, char output[4]) |
string | Base64 (const string &data) |
string | Base64Url (const string &data) |
static bool | Debase64Block (const unsigned char input[4], unsigned char output[3]) |
bool | Debase64 (const string &data, string *decoded) |
string | Tail (const string &source, unsigned num_lines) |
std::string | GetGMTimestamp (const std::string &format) |
Variables | |
const char | b64_table [] |
const int8_t | db64_table [] |
#define __STDC_FORMAT_MACROS |
string Base64 | ( | const string & | data | ) |
Definition at line 522 of file string.cc.
Referenced by Base64Url(), upload::SessionContext::DoUpload(), AuthzExternalFetcher::Fetch(), receiver::GenerateSessionToken(), MakeAcquireRequest(), anonymous_namespace{repository_session.cc}::MakeAcquireRequest(), anonymous_namespace{repository_session.cc}::MakeDropRequest(), MakeEndRequest(), s3fanout::S3FanoutManager::MkAzureAuthz(), s3fanout::S3FanoutManager::MkPayloadHash(), s3fanout::S3FanoutManager::MkV2Authz(), letter::Letter::Sign(), cipher::Key::ToBase64(), notify::msg::Activity::ToJSONString(), and WaitForReload().
|
inlinestatic |
string Base64Url | ( | const string & | data | ) |
Safe encoding for URIs and path names: replace + by - and / by _
Definition at line 553 of file string.cc.
Referenced by anonymous_namespace{pack.cc}::AppendItemToHeader().
bool Debase64 | ( | const string & | data, |
string * | decoded | ||
) |
Can decode both base64 and base64url
Definition at line 582 of file string.cc.
Referenced by receiver::CheckToken(), notify::msg::Activity::FromJSONString(), receiver::GetTokenPublicId(), s3fanout::S3FanoutManager::MkAzureAuthz(), ObjectPackConsumer::ParseItem(), AuthzExternalFetcher::ParsePermit(), and letter::Letter::Verify().
|
static |
Definition at line 565 of file string.cc.
Referenced by Debase64().
std::string GetGMTimestamp | ( | const std::string & | format | ) |
Get UTC Time.
format | format if timestamp (YYYY-MM-DD HH:MM:SS by default) |
Definition at line 633 of file string.cc.
Referenced by swissknife::CommandGc::Main(), swissknife::Ingest::Main(), main(), swissknife::CommandSync::Main(), StatisticsDatabase::StoreGCStatistics(), and StatisticsDatabase::StorePublishStatistics().
bool GetLineFd | ( | const int | fd, |
std::string * | line | ||
) |
Definition at line 422 of file string.cc.
Referenced by FuseMain(), BashOptionsManager::ParsePath(), manifest::Reflog::ReadChecksum(), and publish::SetInConfig().
bool GetLineFile | ( | FILE * | f, |
std::string * | line | ||
) |
Definition at line 404 of file string.cc.
Referenced by publish::SyncItem::CheckGraft(), cvmfs::Uuid::Create(), publish::CheckoutMarker::CreateFrom(), ResolvConfEventHandler::GetDnsAddresses(), swissknife::CommandLease::Main(), SpecTree::Parse(), catalog::Dirtab::Parse(), dns::HostfileResolver::ParseHostFile(), BashOptionsManager::ParsePath(), upload::GatewayUploader::ReadSessionTokenFile(), and SimpleOptionsParser::TryParsePath().
string GetLineMem | ( | const char * | text, |
const int | text_size | ||
) |
Definition at line 398 of file string.cc.
Referenced by signature::SignatureManager::LoadBlacklist(), catalog::Dirtab::Parse(), ObjectPackConsumer::ParseHeader(), gateway::ParseKey(), and whitelist::Whitelist::ParseWhitelist().
bool HasPrefix | ( | const string & | str, |
const string & | prefix, | ||
const bool | ignore_case | ||
) |
Definition at line 285 of file string.cc.
Referenced by dns::AddDefaultScheme(), s3fanout::CallbackCurlHeader(), download::CallbackCurlHeader(), swissknife::CommandSync::CheckParams(), publish::ClearScratch(), catalog::WritableCatalogManager::CloneTree(), publish::SettingsBuilder::CreateSettingsRepository(), publish::CmdEnter::CreateUnderlay(), catalog::AbstractCatalogManager< CatalogT >::DetachSiblings(), s3fanout::S3FanoutManager::DetectThrottleIndicator(), upload::S3Uploader::DoUpload(), publish::SyncMediator::EnsureAllowed(), OptionsManager::GetEnvironmentSubset(), anonymous_namespace{swissknife_sync.cc}::GlobCheckPath(), RepositoryTag::HasGenericName(), swissknife::CommandTag::InitializeEnvironment(), download::JobInfo::IsFileNotFound(), swissknife::IsRemote(), publish::SyncUnionOverlayfs::IsWhiteoutEntry(), Lsof(), main(), publish::CmdAbort::Main(), swissknife::CommandScrub::MakeRelativePath(), FileSystem::MkCacheParm(), download::PacProxy2Cvmfs(), SpecTree::Parse(), anonymous_namespace{cmd_enter.cc}::RemoveUnderlay(), XattrList::Serialize(), publish::SetInConfig(), download::DownloadManager::SetUrlOptions(), TrimString(), and publish::SyncUnionOverlayfs::UnwindWhiteoutFilename().
bool HasSuffix | ( | const std::string & | str, |
const std::string & | suffix, | ||
const bool | ignore_case | ||
) |
Definition at line 299 of file string.cc.
Referenced by PluginRamCache::Create(), s3fanout::S3FanoutManager::DetectThrottleIndicator(), swissknife::CommandScrub::DirCallback(), upload::S3Uploader::DoUpload(), anonymous_namespace{ssl.cc}::HasCertificates(), FileSystem::SetupRamCacheMgr(), shash::Digest< 16, kMd5 >::ToFingerprint(), shash::Digest< 16, kMd5 >::ToString(), TrimString(), and sqlite::VfsRdOnlyAccess().
std::string IsoTimestamp | ( | ) |
Current time in format YYYYMMDDTHHMMSSZ. Used in AWS4 requests.
Definition at line 167 of file string.cc.
Referenced by s3fanout::S3FanoutManager::MkV4Authz().
time_t IsoTimestamp2UtcTime | ( | const std::string & | iso8601 | ) |
Parses a timestamp of the form YYYY-MM-DDTHH:MM:SSZ Return 0 on error
Definition at line 216 of file string.cc.
Referenced by MountPoint::DetermineRootHash().
string JoinStrings | ( | const vector< string > & | strings, |
const string & | joint | ||
) |
Definition at line 343 of file string.cc.
Referenced by MountPoint::CreateSignatureManager(), TalkManager::FormatProxyInfo(), download::DownloadManager::GeoSortServers(), publish::SettingsBuilder::GetSingleAlias(), anonymous_namespace{cmd_sub.cc}::SwissknifeSubscriber::Init(), loader::LoadLibrary(), swissknife::CommandGc::Main(), main(), swissknife::CommandListReflog::Main(), swissknife::CommandListCatalogs::Main(), swissknife::CommandPull::Main(), swissknife::CommandCheck::Main(), swissknife::CommandFileStats::Main(), publish::CmdEnter::MountCvmfs(), publish::CmdEnter::MountOverlayfs(), OptionsManager::ParseDefault(), anonymous_namespace{cmd_diff.cc}::DiffReporter::PrintDifferences(), swissknife::CommandGraft::Publish(), publish::Repository(), download::ResolveProxyDescription(), MagicXattrManager::SanityCheckProtectedXattrs(), dns::CaresResolver::SetResolvers(), ExternalCacheManager::SpawnPlugin(), AuthzExternalFetcher::StripAuthzSchema(), download::DownloadManager::StripDirect(), SimpleOptionsParser::TryParsePath(), and download::DownloadManager::UpdateProxiesUnlocked().
void ParseKeyvalMem | ( | const unsigned char * | buffer, |
const unsigned | buffer_size, | ||
map< char, string > * | content | ||
) |
Definition at line 355 of file string.cc.
Referenced by manifest::Manifest::LoadMem(), ObjectPackConsumer::ParseHeader(), ParseKeyvalPath(), and letter::Letter::Verify().
bool ParseKeyvalPath | ( | const string & | filename, |
map< char, string > * | content | ||
) |
Definition at line 384 of file string.cc.
Referenced by manifest::Manifest::LoadFile().
string ReplaceAll | ( | const string & | haystack, |
const string & | needle, | ||
const string & | replace_by | ||
) |
Definition at line 502 of file string.cc.
Referenced by gateway::ParseKey(), and download::DownloadManager::SetUrlOptions().
std::string RfcTimestamp | ( | ) |
Current time in format Wed, 01 Mar 2006 12:00:00 GMT
Definition at line 145 of file string.cc.
Referenced by GarbageCollector< CatalogTraversalT, HashFilterT >::AnalyzePreservedCatalogTree(), s3fanout::S3FanoutManager::MkAzureAuthz(), s3fanout::S3FanoutManager::MkV2Authz(), GarbageCollector< CatalogTraversalT, HashFilterT >::SweepDataObjects(), and GarbageCollector< CatalogTraversalT, HashFilterT >::SweepReflog().
vector<string> SplitString | ( | const string & | str, |
char | delim | ||
) |
Definition at line 308 of file string.cc.
Referenced by download::AutoProxy(), manifest::Breadcrumb::Breadcrumb(), publish::SyncItem::CheckGraft(), CheckStrictMount(), ExternalCacheManager::ConnectLocator(), MountPoint::CreateDownloadManagers(), publish::CheckoutMarker::CreateFrom(), XattrList::CreateFromFile(), notify::SubscriberSSE::CurlRecvCB(), cvmfs::cvmfs_getxattr(), DefaultOptionsTemplateManager::DefaultOptionsTemplateManager(), FindExecutable(), swissknife::CommandCheck::FindSubtreeRootCatalog(), FuseMain(), ResolvConfEventHandler::GetDnsAddresses(), receiver::GetSpoolerTempDir(), InitOptionsMgr(), dns::Resolver::IsIpv4Address(), SpecTree::IsMatching(), libcvmfs_initialize(), SpecTree::ListDir(), CachePlugin::Listen(), XattrList::ListKeysPosix(), signature::SignatureManager::LoadPublicRsaKeys(), signature::SignatureManager::LoadTrustedCaCrl(), swissknife::CommandLease::Main(), publish::CmdHelp::Main(), swissknife::CommandPull::Main(), publish::CmdTransaction::Main(), main(), PosixQuotaManager::MainCacheManager(), s3fanout::S3FanoutManager::MkV4Authz(), download::PacProxy2Cvmfs(), SpecTree::Parse(), catalog::VirtualCatalog::ParseActions(), OptionsManager::ParseDefault(), PosixQuotaManager::ParseDirectories(), gateway::ParseKey(), upload::S3Uploader::ParseSpoolerDefinition(), posix_archive_config(), perf::Statistics::PrintJSON(), receiver::CommitProcessor::Process(), download::DownloadManager::ProcessLink(), swissknife::CommandEditTag::RemoveTags(), download::ResolveProxyDescription(), OptionsManager::SanitizeParameterAssignment(), CachePlugin::SessionInfo::SessionInfo(), publish::SettingsStorage::SetLocator(), download::DownloadManager::SetProxyChain(), MountPoint::SetupBehavior(), FileSystem::SetupExternalCacheMgr(), FileSystem::SetupNfsMaps(), upload::SpoolerDefinition::SpoolerDefinition(), AuthzExternalFetcher::StripAuthzSchema(), download::DownloadManager::StripDirect(), anonymous_namespace{cmd_abort.cc}::StripTrailingPath(), publish::SyncUnionTarball::Traverse(), and download::DownloadManager::ValidateGeoReply().
vector<string> SplitStringBounded | ( | unsigned | max_chunks, |
const string & | str, | ||
char | delim | ||
) |
Definition at line 312 of file string.cc.
Referenced by publish::SyncItem::CheckGraft(), publish::CmdCommit::Main(), publish::CmdTransaction::Main(), and SplitString().
int64_t String2Int64 | ( | const string & | value | ) |
Definition at line 240 of file string.cc.
Referenced by s3fanout::CallbackCurlHeader(), FileSystem::DeterminePosixCacheSettings(), FuseMain(), anonymous_namespace{cvmfs_cache_posix.cc}::GetSettings(), IsoTimestamp2UtcTime(), swissknife::CommandGc::Main(), swissknife::Ingest::Main(), swissknife::CommandPull::Main(), main(), PosixQuotaManager::MainCacheManager(), CachePlugin::NotifySupervisor(), publish::Command::ParseOptions(), whitelist::Whitelist::ParseWhitelist(), swissknife::CommandMigrate::ReadPersona(), MountPoint::SetupBehavior(), MountPoint::SetupDnsTuning(), FileSystem::SetupLoggingStandalone(), perf::TelemetryAggregatorInflux::TelemetryAggregatorInflux(), and sqlite::VfsRdOnlyOpen().
uint64_t String2Uint64 | ( | const string & | value | ) |
Definition at line 246 of file string.cc.
Referenced by publish::SettingsBuilder::ApplyOptionsFromServerPath(), manifest::Breadcrumb::Breadcrumb(), receiver::CheckToken(), publish::CmdEnter::CleanupSession(), ExternalCacheManager::ConnectLocator(), PluginRamCache::Create(), MountPoint::CreateCatalogManager(), MountPoint::CreateDownloadManagers(), MountPoint::CreateTables(), MountPoint::CreateTracer(), cvmfs::cvmfs_getxattr(), s3fanout::S3FanoutManager::DetectThrottleIndicator(), publish::ExitShell(), FuseMain(), StatisticsDatabase::GetDBParams(), receiver::GetParamsFromFile(), IngestionPipeline::IngestionPipeline(), LibGlobals::Initialize(), dns::Resolver::IsIpv4Address(), CachePlugin::Listen(), manifest::Manifest::Load(), Lsof(), swissknife::CommandGc::Main(), swissknife::CommandInfo::Main(), main(), swissknife::CommandLetter::Main(), swissknife::CommandPull::Main(), swissknife::CommandCheck::Main(), swissknife::CommandCreate::Main(), swissknife::CommandSync::Main(), TalkManager::MainResponder(), s3fanout::S3FanoutManager::MkV4Authz(), ObjectPackConsumer::ParseHeader(), ObjectPackConsumer::ParseItem(), upload::S3Uploader::ParseSpoolerDefinition(), swissknife::CommandSync::ReadFileChunkingArgs(), MountPoint::SetupBehavior(), MountPoint::SetupDnsTuning(), FileSystem::SetupExternalCacheMgr(), MountPoint::SetupExternalDownloadMgr(), MountPoint::SetupHttpTuning(), MountPoint::SetupInodeAnnotation(), FileSystem::SetupLoggingStandalone(), FileSystem::SetupNfsMaps(), FileSystem::SetupRamCacheMgr(), FileSystem::TriageCacheMgr(), download::DownloadManager::ValidateGeoReply(), and letter::Letter::Verify().
void String2Uint64Pair | ( | const string & | value, |
uint64_t * | a, | ||
uint64_t * | b | ||
) |
Definition at line 281 of file string.cc.
Referenced by TalkManager::MainResponder().
bool String2Uint64Parse | ( | const std::string & | value, |
uint64_t * | result | ||
) |
Parse a string into a a uint64_t.
Unlike String2Uint64, this:
If an error occurs, this returns false and sets errno appropriately.
Definition at line 263 of file string.cc.
Referenced by publish::SyncItem::CheckGraft(), CloseAllFildesInProcSelfFd(), AuthzExternalFetcher::ExecHelper(), catalog::ClientCatalogManager::IsRevisionBlacklisted(), swissknife::CommandGraft::Main(), main(), Url::Parse(), and Url::ValidateHost().
string StringifyBool | ( | const bool | value | ) |
Definition at line 76 of file string.cc.
Referenced by manifest::Manifest::ExportString(), swissknife::CommandInfo::Main(), and TalkManager::MainResponder().
string StringifyDouble | ( | const double | value | ) |
Definition at line 96 of file string.cc.
Referenced by sqlite::Sql::DebugResultTable(), HitrateMagicXattr::FinalizeValue(), JsonStringGenerator::JsonEntry::Format(), swissknife::CommandInfoTag::HumanReadableFilesize(), perf::Counter::PrintRatio(), and JsonDocument::PrintValue().
string StringifyInt | ( | const int64_t | value | ) |
Definition at line 78 of file string.cc.
Referenced by anonymous_namespace{pack.cc}::AppendItemToHeader(), PosixQuotaManager::BindReturnPipe(), swissknife::CommandListCatalogs::CatalogCallback(), swissknife::CommandFileStats::CatalogCallback(), catalog::WritableCatalog::CopyToParent(), PosixQuotaManager::CreateShared(), publish::CmdEnter::CreateUnderlay(), CreateUserNamespace(), cvmfs_options_clone_legacy(), cvmfs_options_init_legacy(), sqlite::Sql::DebugResultTable(), RamCacheManager::Describe(), upload::SessionContext::DoUpload(), anonymous_namespace{cmd_enter.cc}::EnterRootContainer(), swissknife::Error(), manifest::Manifest::ExportString(), AuthzExternalFetcher::Fetch(), download::DownloadManager::Fetch(), catalog::ClientCatalogManager::FetchCatalogByHash(), MountPoint::FetchHistory(), LHashMagicXattr::FinalizeValue(), NCleanup24MagicXattr::FinalizeValue(), NClgMagicXattr::FinalizeValue(), NIOErrMagicXattr::FinalizeValue(), RxMagicXattr::FinalizeValue(), SpeedMagicXattr::FinalizeValue(), TimestampLastIOErrMagicXattr::FinalizeValue(), ExpiresMagicXattr::FinalizeValue(), InodeMaxMagicXattr::FinalizeValue(), MaxFdMagicXattr::FinalizeValue(), PidMagicXattr::FinalizeValue(), JsonStringGenerator::JsonEntry::Format(), TalkManager::FormatHostInfo(), TalkManager::FormatMetalinkInfo(), TalkManager::FormatProxyInfo(), FuseMain(), swissknife::CommandMigrate::ChownMigrationWorker::GenerateMappingStatement(), Watchdog::GenerateStackTrace(), catalog::TreeCountersBase< FieldT >::GetCsvMap(), CachePlugin::HandleHandshake(), AuthzExternalFetcher::Handshake(), swissknife::CommandInfoTag::HumanReadableFilesize(), Init(), PosixQuotaManager::InitDatabase(), anonymous_namespace{pack.cc}::InitializeHeader(), FileSystem::LockWorkspace(), CachePlugin::LogSessionError(), CachePlugin::LogSessionInfo(), swissknife::CommandInfo::Main(), swissknife::CommandPull::Main(), publish::CmdEnter::Main(), main(), PosixQuotaManager::MainCacheManager(), Tracer::MainFlush(), swissknife::CommandFileStats::MainProcessing(), TalkManager::MainResponder(), MaintenanceMode(), MakeAcquireRequest(), anonymous_namespace{repository_session.cc}::MakeAcquireRequest(), perf::TelemetryAggregatorInflux::MakeDeltaPayload(), publish::SettingsStorage::MakeGateway(), perf::TelemetryAggregatorInflux::MakePayload(), PosixQuotaManager::MakeReturnPipe(), s3fanout::S3FanoutManager::MkAzureAuthz(), publish::CmdEnter::MountCvmfs(), publish::CmdEnter::MountOverlayfs(), ChunkListMagicXattr::PrepareValueFenced(), perf::Counter::Print(), s3fanout::Statistics::Print(), download::DownloadManager::ProxyInfo::Print(), glue::InodeTracker::Statistics::Print(), swissknife::CommandListTags::PrintHumanReadableTagList(), cvmfs::PrintInodeGeneration(), perf::Counter::PrintK(), perf::Counter::PrintKi(), perf::Counter::PrintM(), catalog::Catalog::PrintMemStatistics(), perf::Counter::PrintMi(), JsonDocument::PrintValue(), swissknife::CommandGraft::Publish(), publish::Publisher(), loader::Reload(), anonymous_namespace{cmd_enter.cc}::RemoveSingle(), anonymous_namespace{cmd_enter.cc}::RemoveUnderlay(), swissknife::CommandMigrate::StatsMigrationWorker::RepairStatisticsCounters(), Watchdog::ReportStacktrace(), RestoreState(), publish::RunSuidHelper(), SaveState(), Watchdog::SendTrace(), FileSystem::SetupCrashGuard(), letter::Letter::Sign(), ExternalCacheManager::SpawnPlugin(), catalog::SqlAllChunks::SqlAllChunks(), Watchdog::Supervise(), download::DownloadManager::SwitchHostInfo(), notify::msg::Activity::ToJSONString(), manifest::Breadcrumb::ToString(), perf::Counter::ToString(), PosixQuotaManager::UnlinkReturnPipe(), Url::Url(), and AuthzExternalFetcher::~AuthzExternalFetcher().
string StringifyLocalTime | ( | const time_t | seconds | ) |
Converts seconds since UTC 0 into something like 12 Sep 14:59:37 CDT
Definition at line 126 of file string.cc.
Referenced by LogBufferXattr::FinalizeValue().
string StringifyTime | ( | const time_t | seconds, |
const bool | utc | ||
) |
Converts seconds since UTC 0 into something readable
Definition at line 105 of file string.cc.
Referenced by GarbageCollectorAux< CatalogTraversalT, HashFilterT >::CollectOlderThan(), MountPoint::DetermineRootHash(), notify::DoPublish(), catalog::ClientCatalogManager::GetNewRootCatalogContext(), swissknife::CommandGc::Main(), TalkManager::MainResponder(), anonymous_namespace{cmd_diff.cc}::DiffReporter::OnInit(), whitelist::Whitelist::ParseWhitelist(), GarbageCollector< CatalogTraversalT, HashFilterT >::PreserveDataObjects(), swissknife::CommandInfoTag::PrintHumanReadableInfo(), swissknife::CommandListTags::PrintHumanReadableTagList(), swissknife::CommandPull::Pull(), and GarbageCollector< CatalogTraversalT, HashFilterT >::SweepDataObjects().
string StringifyTimeval | ( | const timeval | value | ) |
Definition at line 203 of file string.cc.
Referenced by Tracer::MainFlush().
std::string StringifyUint | ( | const uint64_t | value | ) |
Definition at line 84 of file string.cc.
Referenced by cvmfs::MemSink::Describe(), download::DownloadManager::Fetch(), ChunksMagicXattr::FinalizeValue(), ExternalTimeoutMagicXattr::FinalizeValue(), NCleanup24MagicXattr::FinalizeValue(), RevisionMagicXattr::FinalizeValue(), TimeoutMagicXattr::FinalizeValue(), TimeoutDirectMagicXattr::FinalizeValue(), UptimeMagicXattr::FinalizeValue(), receiver::GenerateSessionToken(), StatisticsDatabase::GetDBParams(), swissknife::CommandGraft::GetParams(), BaseMagicXattr::GetValue(), receiver::Reactor::HandleRequest(), BaseMagicXattr::HeaderMultipageHuman(), TalkManager::MainResponder(), perf::TelemetryAggregatorInflux::MakeDeltaPayload(), perf::TelemetryAggregatorInflux::MakePayload(), ChunkListMagicXattr::PrepareValueFenced(), StatisticsDatabase::Prune(), MagicXattrManager::SanityCheckProtectedXattrs(), download::DownloadManager::SwitchProxyGroup(), manifest::Breadcrumb::ToString(), and Log2Histogram::ToString().
string Tail | ( | const string & | source, |
unsigned | num_lines | ||
) |
string ToUpper | ( | const string & | mixed_case | ) |
Converts all characters to upper case
Definition at line 494 of file string.cc.
Referenced by OptionsManager::IsOff(), OptionsManager::IsOn(), and MountPoint::SetupBehavior().
string Trim | ( | const string & | raw, |
bool | trim_newline | ||
) |
Removes leading and trailing whitespaces.
Definition at line 446 of file string.cc.
Referenced by publish::SyncItem::CheckGraft(), MountPoint::CreateDownloadManagers(), publish::CheckoutMarker::CreateFrom(), s3fanout::S3FanoutManager::DetectThrottleIndicator(), FuseMain(), download::DownloadManager::GeoSortServers(), TalkManager::MainResponder(), SpecTree::Parse(), gateway::ParseKey(), catalog::Dirtab::ParseLine(), manifest::Reflog::ReadChecksum(), OptionsManager::SanitizeParameterAssignment(), publish::SetInConfig(), MountPoint::SetupBehavior(), OptionsManager::TrimParameter(), and SimpleOptionsParser::TryParsePath().
std::string TrimString | ( | const std::string & | path, |
const std::string & | toTrim, | ||
const int | trimMode | ||
) |
Definition at line 468 of file string.cc.
Referenced by swissknife::Ingest::Main().
std::string WhitelistTimestamp | ( | time_t | when | ) |
UTC time in format YYYYMMDDHHMMSS. Used in cvmfs whitelists.
Definition at line 187 of file string.cc.
Referenced by whitelist::Whitelist::CreateString().
const char b64_table[] |
Definition at line 33 of file string.cc.
Referenced by Base64().
const int8_t db64_table[] |
Decode Base64 and Base64Url
Definition at line 43 of file string.cc.
Referenced by Debase64Block().