~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/utf8/utf8.h

  • Committer: Brian Aker
  • Date: 2010-10-10 19:32:58 UTC
  • Revision ID: brian@tangent.org-20101010193258-uvwhrqqpbd2e065x
Added support for pre/post triggers (this removes the need for the current
logging system I believe).

Add test cases to existing triggers.

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
}