~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/utf8/utf8.h

  • Committer: Monty Taylor
  • Date: 2010-08-21 02:55:13 UTC
  • mfrom: (1711.6.12 staging)
  • Revision ID: mordred@inaugust.com-20100821025513-3xyidjf8dodeh4gy
Remove btree heap index.

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
}