LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
LocARNA::string1 Class Reference

A simple 1-based string. More...

#include <string1.hh>

List of all members.

Public Member Functions

 string1 (const std::string &s)
 Construct from std::string.
 string1 (const string1 &s)
 Copy constructor.
const std::string & str () const
std::string & str ()
const char & operator[] (size_t i) const
 Read access.
char & operator[] (size_t i)
 Read/write access.
size_t length () const
 Provide length.
string1operator= (const string1 &s)
 Assignment operator.
void reverse ()
 reverse string
void push_back (char c)
 push back character
string1 substr (size_t pos, size_t len) const
 Substring.

Detailed Description

A simple 1-based string.

Features:


Constructor & Destructor Documentation

LocARNA::string1::string1 ( const std::string &  s) [inline, explicit]

Construct from std::string.

Parameters:
sstring
LocARNA::string1::string1 ( const string1 s) [inline]

Copy constructor.

Parameters:
sstring (of type string1)

Member Function Documentation

size_t LocARNA::string1::length ( ) const [inline]

Provide length.

Returns:
length of string
string1& LocARNA::string1::operator= ( const string1 s) [inline]

Assignment operator.

Parameters:
sstring
Returns:
*this
Postcondition:
*this equals s
const char& LocARNA::string1::operator[] ( size_t  i) const [inline]

Read access.

Parameters:
iindex F
Returns:
ith character of string
Note:
1-based
char& LocARNA::string1::operator[] ( size_t  i) [inline]

Read/write access.

Parameters:
iindex
Returns:
(reference to) ith character of string
Note:
1-based
void LocARNA::string1::push_back ( char  c) [inline]

push back character

Parameters:
ccharacter
const std::string& LocARNA::string1::str ( ) const [inline]

Cast to std::string (const)

Returns:
string
std::string& LocARNA::string1::str ( ) [inline]

Cast to std::string

Returns:
string
string1 LocARNA::string1::substr ( size_t  pos,
size_t  len 
) const [inline]

Substring.

Parameters:
posstart position of substring, 1-based
lenlength of substring
Returns:
substring at pos of length len

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends