File String.hpp

Parent directory (DlSystem)

Definition (DlSystem/String.hpp)

Includes

  • string

Classes

Full File Listing

namespace DlSystem
class String
#include <String.hpp>

Public Functions

String() = delete
explicit String(const std::string &str)

Constructor for the String class.

Parameters

str[in] Const std::string variable which is used to initialize

Returns

String initialized with given str

explicit String(std::string &&str) noexcept
explicit String(const char *str)
String(String &&other) noexcept = default

Copy and Move Constructor for the String class.

Parameters

other[in] Another String variable

Returns

String initialized with given String

String(const String &other) = delete
String &operator=(String &&other) noexcept = default

Move assigment operator for the String class.

Parameters

Other[in] Another String variable

Returns

String initialized with given String

Note

Behaves as the default move assignemnt operator provided by compiler

String &operator=(const String &other) = delete

Deleted copy assigment operator for the String class.

Parameters

Other[in] Another String variable

Returns

String initialized with given String

Note

This line explicitly deletes the copy assignment operator for the String class, preventing copying

bool operator<(const String &rhs) const noexcept

Comparision operators for the String Class.

Parameters

rhs[in] Another String variable

Returns

True or False, depending on if String <operator> rhs is True or False lexicographically

bool operator>(const String &rhs) const noexcept
bool operator<=(const String &rhs) const noexcept
bool operator>=(const String &rhs) const noexcept
bool operator==(const String &rhs) const noexcept
bool operator!=(const String &rhs) const noexcept
bool operator<(const std::string &rhs) const noexcept

Comparision operators for the String Class.

Parameters

rhs[in] std::string variable

Returns

True or False, depending on if String <operator> rhs is True or False lexicographically

bool operator>(const std::string &rhs) const noexcept
bool operator<=(const std::string &rhs) const noexcept
bool operator>=(const std::string &rhs) const noexcept
bool operator==(const std::string &rhs) const noexcept
bool operator!=(const std::string &rhs) const noexcept
const char *c_str() const noexcept

Returns the C style string for this class.

Returns

C string for the current class

explicit operator std::string&() noexcept

onversion operators for the String Class to convert to std::string class

Returns

A variable of type std::string or const std::string

explicit operator const std::string&() const noexcept

onversion operators for the String Class to convert to std::string class

Returns

A variable of type std::string or const std::string