Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Lewis <dan@mono-cvs.ximian.com>2002-02-11 20:38:28 +0300
committerDan Lewis <dan@mono-cvs.ximian.com>2002-02-11 20:38:28 +0300
commit2fb02f01eeba0f2a25039dec77bf92f756830b99 (patch)
treeae749e3264e03b5808904c7ef6676d3c7f47eaa9
parent70b7cd6b1e9c10f59d977451779982045a111693 (diff)
}} escape for String.Format
svn path=/trunk/mcs/; revision=2322
-rw-r--r--mcs/class/corlib/System/String.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index 5c4d65dea0a..d73db0e02e3 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -752,11 +752,11 @@ namespace System {
int start = ptr;
while (ptr < format.Length) {
char c = format[ptr ++];
-
+
if (c == '{') {
result.Append (format, start, ptr - start - 1);
- // check for escaped bracket
+ // check for escaped open bracket
if (format[ptr] == '{') {
start = ptr ++;
@@ -804,6 +804,10 @@ namespace System {
start = ptr;
}
+ else if (c == '}' && format[ptr] == '}') {
+ result.Append (format, start, ptr - start - 1);
+ start = ptr ++;
+ }
}
if (start < format.Length)