Berkeley SfM
Namespaces | Functions
string_utils.h File Reference
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

 string
 

Functions

bool string::IsUpper (const std::string &string)
 
bool string::IsLower (const std::string &string)
 
bool string::IsNumber (const std::string &string)
 
bool string::IsAlphabetic (const std::string &string)
 
bool string::HasPrefix (const std::string &string, const std::string &prefix)
 
bool string::HasSuffix (const std::string &string, const std::string &suffix)
 
bool string::HasExtension (const std::string &string, const std::string &extension)
 
void string::ToUpper (std::string *string)
 
void string::ToLower (std::string *string)
 
bool string::ReplaceAll (std::string *string, const std::string &replace_this, const std::string &with_this)
 
bool string::ReplaceAllChar (std::string *string, char replace_this, char with_this)
 
bool string::RemoveNumbers (std::string *string)
 
std::string string::CreateTimestampedFilename (const std::string &base, const std::string &extension, const bool include_date=true)
 
std::string string::GetDir (const std::string &string)
 
std::string string::GetPath (const std::string &string)
 
std::string string::GetRootDir (const std::string &string)
 
std::string string::GetFileName (const std::string &string)
 
std::string string::GetFileNameNoExtension (const std::string &string)
 
bool string::RemoveExtension (std::string *string)
 
bool string::RemovePrefix (std::string *string)
 
bool string::RemoveSuffix (std::string *string)
 
std::string string::GetExtension (const std::string &string)
 
void string::ReplaceExtension (std::string *string, const std::string &new_extension)
 
std::string string::JoinFilePath (const std::vector< std::string > &strings)
 
bool string::IsAbsolutePath (const std::string &string)
 
bool string::Tokenize (const std::string &string, const std::vector< char > &delimiters, std::vector< std::string > *tokens)
 
bool string::TokenizeFileString (const std::string &file_string, std::vector< std::string > *tokens)
 
void string::TrimWhiteSpace (std::string *string)
 
std::string string::StringPrintf (const std::string &string)
 
std::string string::StringScanf (const std::string &string)
 
size_t string::FindFirstOf (const std::string &string)
 
size_t string::FindLastOf (const std::string &string)
 
std::vector< size_t > string::FindAllOf (const std::string &string)
 
void string::RemoveFirstOf (std::string *string, const std::string &remove_this)
 
void string::RemoveLastOf (std::string *string, const std::string &remove_this)
 
void string::RemoveAll (std::string *string, const std::string &remove_this)
 
std::string string::Substring (const std::string &string)
 
std::string string::After (const std::string &string, const std::string &after_this)
 
std::string string::Before (const std::string &string, const std::string &before_this)
 
void string::Append (std::string *base, const std::string &append)
 
void string::Append (std::string *first, const std::vector< std::string > &second)
 
bool string::TrimFromBackToLength (std::string *string, size_t length)
 
bool string::TrimFromFrontToLength (std::string *string, size_t length)
 
bool string::TrimFromTo (std::string *string, size_t from, size_t to)
 
bool string::FileNamesEquivalent (const std::string &one, const std::string &two)
 
bool string::ExtensionsEquivalent (const std::string &one, const std::string &two)
 
bool string::FilePathsEquivalent (const std::string &one, const std::string &two)
 
void string::Reverse (std::string *string)