A simple 1-based string.
More...
#include <string1.hh>
A simple 1-based string.
Features:
- based on c++ std::string class, but offers very limited interface
- conversion from and to std::string
- access via operator []
- support of various "string" methods
◆ string1() [1/2]
LocARNA::string1::string1 |
( |
const std::string & |
s | ) |
|
|
inlineexplicit |
Construct from std::string.
- Parameters
-
◆ string1() [2/2]
LocARNA::string1::string1 |
( |
const string1 & |
s | ) |
|
|
inline |
Copy constructor.
- Parameters
-
s | string (of type string1) |
◆ length()
size_t LocARNA::string1::length |
( |
| ) |
const |
|
inline |
Provide length.
- Returns
- length of string
◆ operator=()
Assignment operator.
- Parameters
-
- Returns
- *this
- Postcondition
- *this equals s
◆ operator[]() [1/2]
char& LocARNA::string1::operator[] |
( |
size_t |
i | ) |
|
|
inline |
Read/write access.
- Parameters
-
- Returns
- (reference to) ith character of string
- Note
- 1-based
◆ operator[]() [2/2]
const char& LocARNA::string1::operator[] |
( |
size_t |
i | ) |
const |
|
inline |
Read access.
- Parameters
-
- Returns
- ith character of string
- Note
- 1-based
◆ push_back()
void LocARNA::string1::push_back |
( |
char |
c | ) |
|
|
inline |
push back character
- Parameters
-
◆ str() [1/2]
std::string& LocARNA::string1::str |
( |
| ) |
|
|
inline |
Cast to std::string
- Returns
- string
◆ str() [2/2]
const std::string& LocARNA::string1::str |
( |
| ) |
const |
|
inline |
Cast to std::string (const)
- Returns
- string
◆ substr()
string1 LocARNA::string1::substr |
( |
size_t |
pos, |
|
|
size_t |
len |
|
) |
| const |
|
inline |
Substring.
- Parameters
-
pos | start position of substring, 1-based |
len | length of substring |
- Returns
- substring at pos of length len
The documentation for this class was generated from the following file: