~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.cc

  • Committer: Brian Aker
  • Date: 2010-01-27 19:09:05 UTC
  • mfrom: (1271.2.15 rot-13)
  • Revision ID: brian@gaz-20100127190905-a60d1px4bzuz4q50
Merge rot13()

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#include "drizzled/internal/my_sys.h"
21
21
#include "drizzled/internal/m_string.h"
22
22
#include "drizzled/charset.h"
 
23
#include "drizzled/global_charset_info.h"
23
24
 
24
25
#include <algorithm>
25
26
 
28
29
using namespace drizzled;
29
30
using namespace std;
30
31
 
 
32
 
 
33
// Converstion functions to and from std::string.
 
34
 
 
35
std::string String_to_std_string(String const& s)
 
36
{
 
37
   return std::string(s.ptr(), s.length());
 
38
}
 
39
 
 
40
String* set_String_from_std_string(String* s, std::string const& cs)
 
41
{
 
42
   s->set_ascii(cs.c_str(), cs.length());
 
43
   s->copy();
 
44
   return s;
 
45
}
 
46
 
31
47
/*****************************************************************************
32
48
** String functions
33
49
*****************************************************************************/