~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/utf8/utf8.h

  • Committer: Brian Aker
  • Date: 2010-10-12 06:13:30 UTC
  • mto: (1857.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1858.
  • Revision ID: brian@tangent.org-20101012061330-omrzr0yla4ybul3t
More testing around events.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
static inline uint32_t char_length(const std::string &in_string)
114
114
{
115
115
  uint32_t length= 0;
116
 
  int seq_length= 0;
117
116
  std::string::const_iterator iter= in_string.begin();
118
117
  while (iter < in_string.end())
119
118
  {
120
119
    length++;
121
 
    seq_length= sequence_length(*iter);
122
 
    iter += (seq_length > 0) ? seq_length : 1;
 
120
    iter += sequence_length(*iter);
123
121
  }
124
122
  return length;
125
123
}