aboutsummaryrefslogtreecommitdiffstats
path: root/include/charset.h
blob: 9c2be4c079063155c955b2c86672d44aa29d7311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*************************************************
* Character Set Handling Header File             *
* (C) 1999-2007 Jack Lloyd                       *
*************************************************/

#ifndef BOTAN_CHARSET_H__
#define BOTAN_CHARSET_H__

#include <botan/types.h>
#include <botan/enums.h>
#include <string>

namespace Botan {

/*************************************************
* Character Set Transcoder Interface             *
*************************************************/
class Charset_Transcoder
   {
   public:
      virtual std::string transcode(const std::string&,
                                    Character_Set, Character_Set) const = 0;

      virtual ~Charset_Transcoder() {}
   };

namespace Charset {

/*************************************************
* Character Set Handling                         *
*************************************************/
std::string transcode(const std::string&, Character_Set, Character_Set);

bool is_digit(char);
bool is_space(char);
bool caseless_cmp(char, char);

byte char2digit(char);
char digit2char(byte);

}

}

#endif