blob: 01b1f5bb192a52274a75baf476728af0723813e0 (
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
|
/* This is RTF to HTML converter, implemented as a text filter, generally.
Copyright (C) 2003 Valentin Lavrinenko, [email protected]
available at http://rtf2html.sf.net
Original available under the terms of the GNU LGPL2, and according
to those terms, relicensed under the GNU GPL2 for inclusion in Tellico */
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License as *
* published by the Free Software Foundation; *
* *
***************************************************************************/
#ifndef __COMMON_H__
#define __COMMON_H__
#include <string>
#include <sstream>
#include <iomanip>
inline std::string from_int(int value)
{
std::ostringstream buf;
buf<<value;
return buf.str();
}
inline std::string hex(unsigned int value)
{
std::ostringstream buf;
buf<<std::setw(2)<<std::setfill('0')<<std::hex<<value;
return buf.str();
}
#endif
|