1 #ifndef TEUCHOS_STRING_HPP
2 #define TEUCHOS_STRING_HPP
5 #include <Teuchos_Assert.hpp>
12 inline int size(std::string
const& s) {
16 inline std::string::reference at(std::string& s,
int i) {
17 TEUCHOS_DEBUG_ASSERT(0 <= i);
18 TEUCHOS_DEBUG_ASSERT(i <
int(s.size()));
19 return s[std::size_t(i)];
22 inline std::string::const_reference at(std::string
const& s,
int i) {
23 TEUCHOS_DEBUG_ASSERT(0 <= i);
24 TEUCHOS_DEBUG_ASSERT(i <
int(s.size()));
25 return s[std::size_t(i)];
28 inline void resize(std::string& s,
int n) {
29 TEUCHOS_DEBUG_ASSERT(0 <= n);
30 s.resize(std::size_t(n));