Add reverse_iterator to String

This commit is contained in:
Jean-Marcel Flach 2015-06-29 13:23:49 +02:00
parent 8af8c233a3
commit 2560a9733d
1 changed files with 26 additions and 0 deletions

View File

@ -47,6 +47,12 @@ public:
typedef std::string::iterator iterator; typedef std::string::iterator iterator;
typedef std::string::const_iterator const_iterator; typedef std::string::const_iterator const_iterator;
typedef std::string::reverse_iterator ReverseIterator;
typedef std::string::const_reverse_iterator ConstReverseIterator;
typedef std::string::reverse_iterator reverse_iterator;
typedef std::string::const_reverse_iterator const_reverse_iterator;
typedef std::string::size_type SizeType; typedef std::string::size_type SizeType;
inline String(void) inline String(void)
@ -248,6 +254,26 @@ public:
return m_Data.end(); return m_Data.end();
} }
inline ReverseIterator RBegin(void)
{
return m_Data.rbegin();
}
inline ConstReverseIterator RBegin(void) const
{
return m_Data.rbegin();
}
inline ReverseIterator REnd(void)
{
return m_Data.rend();
}
inline ConstReverseIterator REnd(void) const
{
return m_Data.rend();
}
static const SizeType NPos; static const SizeType NPos;
static Object::Ptr GetPrototype(void); static Object::Ptr GetPrototype(void);