[MonoDevelop] Strange escape algorithm

Vadim Chekan kot.begemot at gmail.com
Thu Jan 22 22:58:13 EST 2009


Perhaps I should be more specific.
I showed my patch which replaces 11 lines with one :)

Vadim.

On Thu, Jan 22, 2009 at 12:47 AM, Federico Di Gregorio <fog at initd.org> wrote:
> Il giorno gio, 22/01/2009 alle 00.26 -0800, Vadim Chekan ha scritto:
>> Am I missing something or escape algorithm was/will be more
>> complicated then it is now?
>>
>> Vadim.
>>
>> Index:
>> main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs
>> ===================================================================
>> ---
>> main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs (revision
>> 124156)
>> +++
>> main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/RefactoryCommands.cs (working
>> copy)
>> @@ -248,17 +248,7 @@
>>
>>                 string EscapeName (string name)
>>                 {
>> -                       if (name.IndexOf ('_') == -1)
>> -                               return name;
>> -
>> -                       StringBuilder sb = new StringBuilder ();
>> -                       for (int i = 0; i < name.Length; i++) {
>> -                               if (name[i] == '_')
>> -                                       sb.Append ('_');
>> -                               sb.Append (name[i]);
>> -                       }
>> -
>> -                       return sb.ToString ();
>> +                       return name.Replace("_", "__");
>>                 }
>
> To me it seems the same as before but I don't have the time for a formal
> proof. :)
>
> federico
>
> --
> Federico Di Gregorio                         http://people.initd.org/fog
> Debian GNU/Linux Developer                                fog at debian.org
> INIT.D Developer                                           fog at initd.org
>            Bhoe, bhe, bhe. Sono brutto e cattivo. Brutto lama! -- Cuzco
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>



-- 
>From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT
is explicitly specified


More information about the Monodevelop-list mailing list