- Documentation of containers, core, and format

This commit is contained in:
2025-12-18 00:00:36 -05:00
parent e7503ed92f
commit 9e6f00eb60
57 changed files with 2007 additions and 805 deletions

View File

@@ -283,10 +283,10 @@ public:
}
///
/// \brief Finds the index of the first occurrence of `c` in the string
/// \brief Finds the index of the first occurrence of \f$c\f$ in the string
/// \param c the character to find
/// \param i the index to start at
/// \returns The index of `c` if it occurs in the string, otherwise returns `size()`
/// \returns The index of \f$c\f$ if it occurs in the string, otherwise returns `size()`
constexpr size_t find(char c, size_t i = 0) const {
if (i >= _size) { // bounds check
return _size;
@@ -297,10 +297,10 @@ public:
}
///
/// \brief Finds the index of the first occurrence of `str` in the string.
/// \brief Finds the index of the first occurrence of \f$str\f$ in the string.
/// \param str the string to find
/// \param i the index to start at
/// \returns The index of `str` if it occurs in the string, otherwise returns `size()`
/// \returns The index of \f$str\f$ if it occurs in the string, otherwise returns `size()`
constexpr size_t find(const cstring& str, size_t i = 0) const {
if (i + str._size > _size) { // bounds check
return _size;
@@ -311,10 +311,10 @@ public:
}
///
/// \brief Finds the index of the last occurrence of `c` in the string.
/// \brief Finds the index of the last occurrence of \f$c\f$ in the string.
/// \param c the string to find
/// \param i the index to start at
/// \returns The index of `c` if it occurs in the string, otherwise returns `size()`
/// \returns The index of \f$c\f$ if it occurs in the string, otherwise returns `size()`
constexpr size_t rfind(char c, size_t i = npos) const {
if (_size == 0) {
return _size;
@@ -328,10 +328,10 @@ public:
}
///
/// \brief Finds the index of the last occurrence of `str` in the string.
/// \brief Finds the index of the last occurrence of \f$str\f$ in the string.
/// \param str the string to find
/// \param i the index to start at
/// \returns The index of `str` if it occurs in the string, otherwise returns `size()`
/// \returns The index of \f$str\f$ if it occurs in the string, otherwise returns `size()`
constexpr size_t rfind(const cstring& str, size_t i = npos) const {
if (_size == 0) {
return _size;