10 #ifndef TEUCHOS_STRING_HPP
11 #define TEUCHOS_STRING_HPP
14 #include <Teuchos_Assert.hpp>
21 inline int size(std::string
const& s) {
25 inline std::string::reference at(std::string& s,
int i) {
26 TEUCHOS_DEBUG_ASSERT(0 <= i);
27 TEUCHOS_DEBUG_ASSERT(i <
int(s.size()));
28 return s[std::size_t(i)];
31 inline std::string::const_reference at(std::string
const& s,
int i) {
32 TEUCHOS_DEBUG_ASSERT(0 <= i);
33 TEUCHOS_DEBUG_ASSERT(i <
int(s.size()));
34 return s[std::size_t(i)];
37 inline void resize(std::string& s,
int n) {
38 TEUCHOS_DEBUG_ASSERT(0 <= n);
39 s.resize(std::size_t(n));