Function right
Synopsis
#include <include/EASTL/string.h>
this_type right(size_type n) const
Description
No description yet.
Source
Lines 3117-3126 in include/EASTL/string.h. Line 744 in include/EASTL/string.h.
template <typename T, typename Allocator>
inline basic_string<T, Allocator> basic_string<T, Allocator>::right(size_type n) const
{
const size_type nLength = length();
if(n < nLength)
return substr(nLength - n, n);
// C++ std says that substr must return default constructed allocated, but we do not.
// Instead it is much more practical to provide the copy of the current allocator
return basic_string(*this, get_allocator());
}