! * \brief Read an element. * \param pos The position at which to read the character. * * \return The char at position */
| 609 | * \return The char at position |
| 610 | */ |
| 611 | char at(size_t pos) const { |
| 612 | if (pos < size()) { |
| 613 | return data()[pos]; |
| 614 | } else { |
| 615 | throw std::out_of_range("tvm::String index out of bounds"); |
| 616 | } |
| 617 | } |
| 618 | |
| 619 | /*! \brief Value returned by find() when no match is found */ |
| 620 | static constexpr size_t npos = static_cast<size_t>(-1); |
no outgoing calls