Added unchecked::previous to the 1.x branch
git-svn-id: http://svn.code.sf.net/p/utfcpp/code@70 a809a056-fc17-0410-9590-b4f493f8b08e
This commit is contained in:
parent
c40168ae30
commit
989700c107
1 changed files with 8 additions and 1 deletions
|
@ -484,13 +484,20 @@ namespace internal
|
|||
}
|
||||
|
||||
template <typename octet_iterator>
|
||||
uint32_t previous(octet_iterator& it)
|
||||
uint32_t prior(octet_iterator& it)
|
||||
{
|
||||
while (internal::is_trail(*(--it))) ;
|
||||
octet_iterator temp = it;
|
||||
return next(temp);
|
||||
}
|
||||
|
||||
// Deprecated in versions that include prior, but only for the sake of consistency (see utf8::previous)
|
||||
template <typename octet_iterator>
|
||||
inline uint32_t previous(octet_iterator& it)
|
||||
{
|
||||
return prior(it);
|
||||
}
|
||||
|
||||
template <typename octet_iterator, typename distance_type>
|
||||
void advance (octet_iterator& it, distance_type n)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue