Skip to content

Commit 2b6bc8e

Browse files
Introduce MessageFormatUtil class for locale independent string formatting
Autoported commit. Original commit hash: [cb37a0b34f]
1 parent b96e8e4 commit 2b6bc8e

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
3+
This file is part of the iText (R) project.
4+
Copyright (c) 1998-2017 iText Group NV
5+
Authors: Bruno Lowagie, Paulo Soares, et al.
6+
7+
This program is free software; you can redistribute it and/or modify
8+
it under the terms of the GNU Affero General Public License version 3
9+
as published by the Free Software Foundation with the addition of the
10+
following permission added to Section 15 as permitted in Section 7(a):
11+
FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
12+
ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
13+
OF THIRD PARTY RIGHTS
14+
15+
This program is distributed in the hope that it will be useful, but
16+
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17+
or FITNESS FOR A PARTICULAR PURPOSE.
18+
See the GNU Affero General Public License for more details.
19+
You should have received a copy of the GNU Affero General Public License
20+
along with this program; if not, see http://www.gnu.org/licenses or write to
21+
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22+
Boston, MA, 02110-1301 USA, or download the license from the following URL:
23+
http://itextpdf.com/terms-of-use/
24+
25+
The interactive user interfaces in modified source and object code versions
26+
of this program must display Appropriate Legal Notices, as required under
27+
Section 5 of the GNU Affero General Public License.
28+
29+
In accordance with Section 7(b) of the GNU Affero General Public License,
30+
a covered work must retain the producer line in every PDF that is created
31+
or manipulated using iText.
32+
33+
You can be released from the requirements of the license by purchasing
34+
a commercial license. Buying such a license is mandatory as soon as you
35+
develop commercial activities involving the iText software without
36+
disclosing the source code of your own applications.
37+
These activities include: offering paid services to customers as an ASP,
38+
serving PDFs on the fly in a web application, shipping iText with a closed
39+
source product.
40+
41+
For more information, please contact iText Software Corp. at this
42+
43+
*/
44+
using System;
45+
using System.Globalization;
46+
using System.Text;
47+
48+
namespace iText.IO.Util {
49+
/// <summary>This file is a helper class for internal usage only.</summary>
50+
/// <remarks>
51+
/// This file is a helper class for internal usage only.
52+
/// Be aware that it's API and functionality may be changed in future.
53+
/// </remarks>
54+
public class MessageFormatUtil {
55+
public static String Format(String pattern, params Object[] arguments) {
56+
StringBuilder sb = new StringBuilder(pattern.Length + arguments.Length * 8);
57+
sb.AppendFormat(CultureInfo.InvariantCulture, pattern, arguments);
58+
return sb.ToString();
59+
}
60+
}
61+
}

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9eb8df0ae7a39a045bb73755f965a691197ba838
1+
cb37a0b34feecd0aaa267448ebbe7745f4e81aa5

0 commit comments

Comments
 (0)