Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
ustring-format.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
/*
3
* Copyright (C) 2002 The gtkmm Development Team
4
*
5
* Functions to format output in one of:
6
* 1. The default locale: format_default()
7
* 2. A specified locale: format_locale()
8
* 3. The classic "C" locale: format_classic()
9
*
10
* Based on Glib::ustring::format() (glibmm/glib/glibmm/ustring.cc)
11
* (FormatStream is a private class, thus we provide a copy here.)
12
*
13
* Can be replaced when Apple Clang supports std::format.
14
*/
15
16
#ifndef SEEN_INKSCAPE_USTRING_FORMAT_H
17
#define SEEN_INKSCAPE_USTRING_FORMAT_H
18
19
#include <sstream>
20
#include <glibmm/ustring.h>
21
22
namespace
Inkscape::ustring
{
23
24
template
<
typename
... T>
25
inline
Glib::ustring
format_classic
(T
const
&... args)
26
{
27
std::ostringstream ss;
28
ss.imbue(std::locale::classic());
29
(ss << ... << args);
30
return
ss.str();
31
}
32
33
}
// namespace Inkscape::ustring
34
35
#endif
// SEEN_INKSCAPE_USTRING_FORMAT_H
36
37
/*
38
Local Variables:
39
mode:c++
40
c-file-style:"stroustrup"
41
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
42
indent-tabs-mode:nil
43
fill-column:99
44
End:
45
*/
46
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
Inkscape::ustring
Definition
ustring-format.h:22
Inkscape::ustring::format_classic
Glib::ustring format_classic(T const &... args)
Definition
ustring-format.h:25
src
util-string
ustring-format.h
Generated on Sun Jun 22 2025 04:02:08 for Inkscape by
1.9.8