Mercurial > projects > dwt-mac
diff dwt/custom/StyleRange.d @ 154:535243e6d16a
Fixes to make dwt compile with ldc
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 13 Jun 2009 00:25:05 +0200 |
parents | 6337764516f1 |
children |
line wrap: on
line diff
--- a/dwt/custom/StyleRange.d Thu Jun 11 01:36:32 2009 +0200 +++ b/dwt/custom/StyleRange.d Sat Jun 13 00:25:05 2009 +0200 @@ -201,30 +201,30 @@ */ public override String toString() { StringBuffer buffer = new StringBuffer(); - buffer.append("StyleRange {"); - buffer.append(start); - buffer.append(", "); - buffer.append(length); - buffer.append(", fontStyle="); + buffer.format("{}", "StyleRange {"); + buffer.format("{}", start); + buffer.format("{}", ", "); + buffer.format("{}", length); + buffer.format("{}", ", fontStyle="); switch (fontStyle) { case DWT.BOLD: - buffer.append("bold"); + buffer.format("{}", "bold"); break; case DWT.ITALIC: - buffer.append("italic"); + buffer.format("{}", "italic"); break; case DWT.BOLD | DWT.ITALIC: - buffer.append("bold-italic"); + buffer.format("{}", "bold-italic"); break; default: - buffer.append("normal"); + buffer.format("{}", "normal"); } String str = super.toString(); int index = tango.text.Util.locate( str, '{'); if( index is str.length ) index = -1; str = str[ index + 1 .. $ ]; - if (str.length > 1) buffer.append(", "); - buffer.append(str); + if (str.length > 1) buffer.format("{}", ", "); + buffer.format("{}", str); return buffer.toString(); } }