[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-list
Subject: RE: [Mono-list] How frozen is the API
From: "James F. Bellinger" <zer () neo ! rr ! com>
Date: 2002-09-28 23:56:16
[Download RAW message or body]
You can already type line = line.TrimEnd('C', 'r', 'l').
No need to do it as a string. :-) The params keyword indicates that it
will form the array for you when you do this. :)
-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com] On
Behalf Of Scott Bronson
Sent: Saturday, September 28, 2002 5:25 PM
To: Mono List
Subject: [Mono-list] How frozen is the API
What are the project's views on adding to the C# API? For instance, it
seems rather absurd to do this:
char[] cc = { 'C', 'r', 'l' };
line = line.TrimEnd(cc);
When a simple overloaded function would allow:
line = line.TrimEnd("Crl");
For instance, one could simply add the following function to
System.String.cs:
public String TrimEnd(String s) {
if (null == s || s.Length == 0)
return InternalTrim(WhiteChars, 2);
return InternalTrim(s.ToCharArray(), 2);
}
Ah, that's much nicer... But, I assume that since the API is frozen,
this would be a bad idea. Am I wrong? Can this functionality be added
somehow?
Thanks,
- Scott
_______________________________________________
Mono-list maillist - Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic