yast2-core
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libycp
src
include
ycp
toString.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| |
3
| __ __ ____ _____ ____ |
4
| \ \ / /_ _/ ___|_ _|___ \ |
5
| \ V / _` \___ \ | | __) | |
6
| | | (_| |___) || | / __/ |
7
| |_|\__,_|____/ |_| |_____| |
8
| |
9
| core system |
10
| (C) SuSE GmbH |
11
\----------------------------------------------------------------------/
12
13
File: toString.h
14
15
Author: Mathias Kettner <kettner@suse.de>
16
Maintainer: Thomas Roelz <tom@suse.de>
17
18
/-*/
19
// -*- c++ -*-
20
21
/*
22
* String conversion functions
23
*
24
* Author: Mathias Kettner <kettner@suse.de>
25
*/
26
27
#ifndef toString_h
28
#define toString_h
29
30
#include <string>
31
#include <stdlib.h>
32
#include <string.h>
33
#include <stdio.h>
34
35
using
std::string;
36
37
38
inline
string
toString
(
int
d)
39
{
40
char
s[32];
41
snprintf(s, 32,
"%d"
, d);
42
return
string(s);
43
}
44
45
46
inline
string
toString
(
long
ld)
47
{
48
char
s[32];
49
snprintf(s, 32,
"%ld"
, ld);
50
return
string(s);
51
}
52
53
inline
string
toString
(
long
long
Ld)
54
{
55
char
s[32];
56
snprintf(s, 32,
"%Ld"
, Ld);
57
return
string(s);
58
}
59
60
#endif // toString_h
61
toString
string toString(int d)
Definition:
toString.h:38
Generated on a sunny day for yast2-core by
1.8.11