From c4f9281f3290683eaeac7bca6d09adbe29874d83 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Tue, 21 Jan 2020 19:10:24 +0700 Subject: [PATCH] SWEEP: Changed ToAppendable() > AsAppendable() --- src/ICU4N/Impl/Normalizer2Impl.cs | 2 +- src/ICU4N/Support/Text/StringBuilderExtensions.cs | 2 +- src/ICU4N/Text/MessageFormat.cs | 2 +- src/ICU4N/Text/UnicodeSet.cs | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ICU4N/Impl/Normalizer2Impl.cs b/src/ICU4N/Impl/Normalizer2Impl.cs index 5fb15f5df..f05a2984c 100644 --- a/src/ICU4N/Impl/Normalizer2Impl.cs +++ b/src/ICU4N/Impl/Normalizer2Impl.cs @@ -83,7 +83,7 @@ public static bool IsJamo(int c) public sealed partial class ReorderingBuffer : IAppendable { public ReorderingBuffer(Normalizer2Impl ni, StringBuilder dest, int destCapacity) - : this(ni, dest.ToAppendable(), destCapacity) + : this(ni, dest.AsAppendable(), destCapacity) { } diff --git a/src/ICU4N/Support/Text/StringBuilderExtensions.cs b/src/ICU4N/Support/Text/StringBuilderExtensions.cs index 630a95a54..3cc03e333 100644 --- a/src/ICU4N/Support/Text/StringBuilderExtensions.cs +++ b/src/ICU4N/Support/Text/StringBuilderExtensions.cs @@ -15,7 +15,7 @@ internal static class StringBuilderExtensions /// /// This . /// An . - internal static IAppendable ToAppendable(this StringBuilder text) + internal static IAppendable AsAppendable(this StringBuilder text) { return new StringBuilderCharSequence(text); } diff --git a/src/ICU4N/Text/MessageFormat.cs b/src/ICU4N/Text/MessageFormat.cs index 0974327b1..2b6b534c8 100644 --- a/src/ICU4N/Text/MessageFormat.cs +++ b/src/ICU4N/Text/MessageFormat.cs @@ -2933,7 +2933,7 @@ internal sealed class AppendableWrapper { public AppendableWrapper(StringBuilder sb) { - app = sb.ToAppendable(); + app = sb.AsAppendable(); length = sb.Length; attributes = null; } diff --git a/src/ICU4N/Text/UnicodeSet.cs b/src/ICU4N/Text/UnicodeSet.cs index 2189c9366..d007b072b 100644 --- a/src/ICU4N/Text/UnicodeSet.cs +++ b/src/ICU4N/Text/UnicodeSet.cs @@ -2378,7 +2378,7 @@ public virtual UnicodeSet ApplyPattern(string pattern, StringBuilder rebuiltPat = new StringBuilder(); RuleCharacterIterator chars = new RuleCharacterIterator(pattern, symbols, pos); - ApplyPattern(chars, symbols, rebuiltPat.ToAppendable(), options); + ApplyPattern(chars, symbols, rebuiltPat.AsAppendable(), options); if (chars.InVariable) { SyntaxError(chars, "Extra chars in variable value"); @@ -2598,11 +2598,11 @@ private void ApplyPattern(RuleCharacterIterator chars, ISymbolTable symbols, switch (setMode) { case SETMODE1_UNICODESET: - nested.ApplyPattern(chars, symbols, patBuf.ToAppendable(), options); + nested.ApplyPattern(chars, symbols, patBuf.AsAppendable(), options); break; case SETMODE2_PROPERTYPAT: chars.SkipIgnored(opts); - nested.ApplyPropertyPattern(chars, patBuf.ToAppendable(), symbols); + nested.ApplyPropertyPattern(chars, patBuf.AsAppendable(), symbols); break; case SETMODE3_PREPARSED: // `nested' already parsed nested.ToPattern(patBuf, false);