~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/utf8/utf8.h

  • Committer: David Shrewsbury
  • Date: 2010-09-21 19:25:33 UTC
  • mto: (1797.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1798.
  • Revision ID: shrewsbury.dave@gmail.com-20100921192533-4b1fjkun33r31pn5
Replace std::map with boost::unordered_map

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
#include <string>
51
51
 
52
 
#include "drizzled/utf8/checked.h"
53
 
#include "drizzled/utf8/unchecked.h"
54
 
 
55
52
namespace drizzled
56
53
{
57
54
namespace utf8
113
110
static inline uint32_t char_length(const std::string &in_string)
114
111
{
115
112
  uint32_t length= 0;
116
 
  int seq_length= 0;
117
113
  std::string::const_iterator iter= in_string.begin();
118
114
  while (iter < in_string.end())
119
115
  {
120
116
    length++;
121
 
    seq_length= sequence_length(*iter);
122
 
    iter += (seq_length > 0) ? seq_length : 1;
 
117
    iter += sequence_length(*iter);
123
118
  }
124
119
  return length;
125
120
}