Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
|
Classes | |
class | tinker::FortranStringView |
Reference to the non-NULL-terminated Fortran strings. Provides a few std::string -style methods to handle the fortran strings. More... | |
Typedefs | |
using | tinker::FstrView = FortranStringView |
An alias of FortranStringView. More... | |
class tinker::FortranStringView |
Reference to the non-NULL-terminated Fortran strings. Provides a few std::string
-style methods to handle the fortran strings.
Public Member Functions | |
size_t | len_trim () const |
Returns the length of string, ignoring the trailing whitespaces. More... | |
std::string | trim () const |
Returns a string without the trailing whitespaces. More... | |
FortranStringView | operator() (int begin1, int back1) const |
Analogous to Fortran str(x:y) syntax. More... | |
FortranStringView | operator() (int begin1) const |
Analogous to Fortran str(x:) syntax. More... | |
template<size_t Len> | |
FortranStringView (char(&src)[Len]) | |
Constructs with a char pointer and the reserved length of the Fortran string. More... | |
FortranStringView (char *src, size_t len) | |
Constructs with a char pointer and the reserved length of the Fortran string. More... | |
template<size_t Len> | |
FortranStringView & | operator= (const char(&src)[Len]) |
Assigned by a C/C++ style string. Ignores the trailing characters if the source is too long. More... | |
FortranStringView & | operator= (const char *src) |
Assigned by a C/C++ style string. Ignores the trailing characters if the source is too long. More... | |
FortranStringView & | operator= (const std::string &src) |
Assigned by a C/C++ style string. Ignores the trailing characters if the source is too long. More... | |
template<size_t Len> | |
bool | operator== (const char(&src)[Len]) const |
Returns true if two strings are equal. More... | |
bool | operator== (const char *src) const |
Returns true if two strings are equal. More... | |
bool | operator== (const std::string &src) const |
Returns true if two strings are equal. More... | |
bool | operator== (const FortranStringView &src) const |
Returns true if two strings are equal. More... | |
|
inline |
Constructs with a char
pointer and the reserved length of the Fortran string.
tinker::FortranStringView::FortranStringView | ( | char * | src, |
size_t | len | ||
) |
Constructs with a char
pointer and the reserved length of the Fortran string.
size_t tinker::FortranStringView::len_trim | ( | ) | const |
Returns the length of string, ignoring the trailing whitespaces.
FortranStringView tinker::FortranStringView::operator() | ( | int | begin1 | ) | const |
Analogous to Fortran str(x:) syntax.
begin1 | One-based index for the beginning index. |
FortranStringView tinker::FortranStringView::operator() | ( | int | begin1, |
int | back1 | ||
) | const |
Analogous to Fortran str(x:y) syntax.
begin1 | One-based index for the beginning index. |
back1 | One-based index for the inclusive ending index. |
FortranStringView & tinker::FortranStringView::operator= | ( | const char * | src | ) |
Assigned by a C/C++ style string. Ignores the trailing characters if the source is too long.
|
inline |
Assigned by a C/C++ style string. Ignores the trailing characters if the source is too long.
FortranStringView & tinker::FortranStringView::operator= | ( | const std::string & | src | ) |
Assigned by a C/C++ style string. Ignores the trailing characters if the source is too long.
bool tinker::FortranStringView::operator== | ( | const char * | src | ) | const |
Returns true
if two strings are equal.
|
inline |
Returns true
if two strings are equal.
bool tinker::FortranStringView::operator== | ( | const FortranStringView & | src | ) | const |
Returns true
if two strings are equal.
bool tinker::FortranStringView::operator== | ( | const std::string & | src | ) | const |
Returns true
if two strings are equal.
std::string tinker::FortranStringView::trim | ( | ) | const |
Returns a string without the trailing whitespaces.
using tinker::FstrView = typedef FortranStringView |
An alias of FortranStringView.