|
Gemmi C++ API
|
Utilities. Mostly for working with strings and vectors. More...
#include <cassert>#include <cctype>#include <cstring>#include <algorithm>#include <iterator>#include <string>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | gemmi |
Functions | |
| void | gemmi::append_to_str (std::string &out, int v) |
| void | gemmi::append_to_str (std::string &out, size_t v) |
| void | gemmi::append_to_str (std::string &out, double)=delete |
| template<typename T > | |
| void | gemmi::append_to_str (std::string &out, const T &v) |
| void | gemmi::cat_to (std::string &) |
| template<typename T , typename... Args> | |
| void | gemmi::cat_to (std::string &out, const T &value, Args const &... args) |
| template<class... Args> | |
| std::string | gemmi::cat (Args const &... args) |
| bool | gemmi::starts_with (const std::string &str, const std::string &prefix) |
| template<size_t N> | |
| bool | gemmi::starts_with (const char *a, const char(&b)[N]) |
| bool | gemmi::ends_with (const std::string &str, const std::string &suffix) |
| char | gemmi::lower (char c) |
| char | gemmi::alpha_up (char c) |
| std::string | gemmi::to_lower (std::string str) |
| std::string | gemmi::to_upper (std::string str) |
| bool | gemmi::isame (char a, char b) |
| bool | gemmi::iequal_from (const std::string &str, size_t offset, const std::string &low) |
| bool | gemmi::iequal (const std::string &str, const std::string &low) |
| bool | gemmi::istarts_with (const std::string &str, const std::string &prefix) |
| bool | gemmi::iends_with (const std::string &str, const std::string &suffix) |
| bool | gemmi::giends_with (const std::string &str, const std::string &suffix) |
| std::string | gemmi::trim_str (const std::string &str) |
| std::string | gemmi::rtrim_str (const std::string &str) |
| const char * | gemmi::rtrim_cstr (const char *start, const char *end=nullptr) |
| template<typename S > | |
| void | gemmi::split_str_into (const std::string &str, S sep, std::vector< std::string > &result) |
| template<typename S > | |
| std::vector< std::string > | gemmi::split_str (const std::string &str, S sep) |
| void | gemmi::split_str_into_multi (const std::string &str, const char *seps, std::vector< std::string > &result) |
| std::vector< std::string > | gemmi::split_str_multi (const std::string &str, const char *seps=" \t") |
| template<typename T , typename S , typename F > | |
| std::string | gemmi::join_str (T begin, T end, const S &sep, const F &getter) |
| template<typename T , typename S > | |
| std::string | gemmi::join_str (T begin, T end, const S &sep) |
| template<typename T , typename S , typename F > | |
| std::string | gemmi::join_str (const T &iterable, const S &sep, const F &getter) |
| template<typename T , typename S > | |
| std::string | gemmi::join_str (const T &iterable, const S &sep) |
| template<typename T , typename S > | |
| void | gemmi::string_append_sep (std::string &str, S sep, const T &item) |
| void | gemmi::replace_all (std::string &s, const std::string &old, const std::string &new_) |
| bool | gemmi::is_in_list (const std::string &name, const std::string &list, char sep=',') |
| template<class T > | |
| bool | gemmi::in_vector (const T &x, const std::vector< T > &v) |
| template<typename F , typename T > | |
| bool | gemmi::in_vector_f (F f, const std::vector< T > &v) |
| template<class T > | |
| T * | gemmi::vector_end_ptr (std::vector< T > &v) |
| template<class T > | |
| const T * | gemmi::vector_end_ptr (const std::vector< T > &v) |
| template<class T > | |
| void | gemmi::vector_move_extend (std::vector< T > &dst, std::vector< T > &&src) |
| template<class T , typename F > | |
| void | gemmi::vector_remove_if (std::vector< T > &v, F &&condition) |
| template<class T > | |
| void | gemmi::vector_insert_columns (std::vector< T > &data, size_t old_width, size_t length, size_t n, size_t pos, const T &new_value) |
| template<class T > | |
| void | gemmi::vector_remove_column (std::vector< T > &data, size_t new_width, size_t pos) |
| constexpr int | gemmi::ialpha4_id (const char *s) |
| constexpr int | gemmi::ialpha3_id (const char *s) |
Utilities. Mostly for working with strings and vectors.
Definition in file util.hpp.