81 using std::string::string;
82 using std::string::operator=;
97 inline operator const char*()
const;
116 [[deprecated(
"Use std::string::compare, or G4StrUtil::icompare for case-insensitive comparison")]]
121 [[deprecated(
"Use std::getline instead, plus G4StrUtil::lstrip if required")]]
126 [[deprecated(
"Use std::string::erase instead")]]
131 [[deprecated(
"Use G4StrUtil::contains instead")]]
136 [[deprecated(
"Use G4StrUtil::contains instead")]]
141 [[deprecated(
"Use G4StrUtil::{lstrip,rstrip,strip}_copy instead")]]
146 [[deprecated(
"Use G4StrUtil::to_lower/to_lower_copy instead")]]
151 [[deprecated(
"Use G4StrUtil::to_upper/to_upper_copy instead")]]
302 G4String::size_type count = G4String::npos);
316#include "G4String.icc"
G4int compareTo(std::string_view, caseCompare mode=exact) const
Deprecated function.
const_reference operator[](int) const
G4bool contains(char) const
Deprecated function.
G4String & operator=(const G4String &)
G4bool contains(const std::string &) const
Deprecated function.
void toUpper()
Deprecated function.
G4String(const G4String &)
void toLower()
Deprecated function.
G4String strip(stripType strip_Type=trailing, char ch=' ')
Deprecated function.
std::istream & readLine(std::istream &, G4bool skipWhite=true)
Deprecated function.
G4String(const std::string &)
G4String & remove(size_type)
Deprecated function.
G4String & operator=(G4String &&)
reference operator[](int)
Override of subscript operator for int to suppress C2666 errors with MSVC.
Query and manipulation functions for G4String.
G4String strip_copy(G4String str, char ch=' ')
Return copy of string with leading and trailing characters removed.
G4String to_lower_copy(G4String str)
Return lowercased copy of string.
G4int icompare(std::string_view lhs, std::string_view rhs)
Case insensitive comparison of two strings.
void strip(G4String &str, char ch=' ')
Remove leading and trailing characters from string.
void to_upper(G4String &str)
Convert string to uppercase.
void safe_erase(G4String &str, G4String::size_type index=0, G4String::size_type count=G4String::npos)
Remove specified in-range characters from string.
void lstrip(G4String &str, char ch=' ')
Remove leading characters from string.
void rstrip(G4String &str, char ch=' ')
Remove trailing characters from string.
G4bool contains(const G4String &str, std::string_view ss)
Check if a string contains a given substring.
G4String to_upper_copy(G4String str)
Return uppercase copy of string.
void to_lower(G4String &str)
Convert string to lowercase.
G4String lstrip_copy(G4String str, char ch=' ')
Return copy of string with leading characters removed.
bool ends_with(const G4String &str, std::string_view ss)
Return true if a string ends with a given suffix.
std::istream & readline(std::istream &is, G4String &str, G4bool skipWhite=true)
Read characters into a G4String from an input stream until end-of-line.
G4String rstrip_copy(G4String str, char ch=' ')
Return copy of string with trailing characters removed.
bool starts_with(const G4String &str, std::string_view ss)
Return true if a string starts with a given prefix.