Dev Essential  1.6.3
Loading...
Searching...
No Matches
string_check.h
Go to the documentation of this file.
1
14
15#ifndef DDL_UTILITY_STRING_CHECK_H_INCLUDED
16#define DDL_UTILITY_STRING_CHECK_H_INCLUDED
17
19
20#include <string>
21
22namespace ddl {
23namespace dd {
24namespace utility {
25
31bool isInteger(const std::string& string_to_check) noexcept;
32
33} // namespace utility
34} // namespace dd
35
36namespace utility {
37
38// for binary compatiblity the isInterger stays within dd::utility namespace for now!
40
48Optional<int> toType(const std::string& from_string, const Optional<int>& default_value = {});
49
57Optional<size_t> toType(const std::string& from_string,
58 const utility::Optional<size_t>& default_value = {});
59
68Optional<std::string> toType(const std::string& from_string,
69 const utility::Optional<std::string>& default_value = {});
70
77void replaceInString(std::string& string_data,
78 const std::string& to_replace,
79 const std::string& replace_with);
80
81} // namespace utility
82} // namespace ddl
83
84#endif // DDL_UTILITY_STRING_CHECK_H_INCLUDED
definition of the old compatibility utility namespace
Definition datamodel_keyvalue.h:160
bool isInteger(const std::string &string_to_check) noexcept
Checks if the given string is an integer value.
definition of the dd namespace
Definition datamodel_base.h:26
definition of the utility namespace
Definition ddl.h:66
void replaceInString(std::string &string_data, const std::string &to_replace, const std::string &replace_with)
In place replacement helper function.
Optional< int > toType(const std::string &from_string, const Optional< int > &default_value={})
specialized conversion to the Optional<int>
definition of the ddl namespace
Definition codec.h:21
An optional template as long as the std::optional is not available here.
Definition access_optional.h:31