~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/utf8/utf8.h

  • Committer: lbieber
  • Date: 2010-10-02 14:36:07 UTC
  • mfrom: (1799.7.7 drizzle-bug-649844)
  • mto: This revision was merged to the branch mainline in revision 1809.
  • Revision ID: lbieber@orisndriz08-20101002143607-fffgvc6l4gw9drmm
Merge Andrew - fix bug 649844 - Clean up and fix some drizzledump options along with some documentation fixes

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
}