Add parameterless overloads of TrimStart/TrimEnd#8834
Add parameterless overloads of TrimStart/TrimEnd#8834joperezr merged 3 commits intodotnet:masterfrom
Conversation
|
Hi @thiagocamargos, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
|
@thiagocamargos, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
joperezr
left a comment
There was a problem hiding this comment.
Hello @thiagocamargos thanks for your contribution!
LGTM apart from that small comment I gave. We will need to add the appropiate tests into corefx once we expose this.
|
|
||
| // Removes a set of characters from the beginning of this string. | ||
| public String TrimStart() { | ||
| return TrimHelper(TrimHead); |
There was a problem hiding this comment.
Nit: You could simplify this by simply doing:
public string TrimStart() => TrimHelper(TrimHead);
public string TrimEnd() => TrimHelper(TrimTail);|
Hi @joperezr Should I adapt the test to ensure it will also keep calling the params char [] overload when trimChars is null? |
Yes, I believe you should ensure it keeps calling the other params one so that we don't loose coverage there and perhaps add some basic ones for this two methods as well. |
|
@thiagocamargos thanks for your contribution! |
|
@thiagocamargos Would you mind porting this change to CoreRT (https://github.com/dotnet/corert/tree/master/src/System.Private.CoreLib/src) as well? |
|
Hi @jkotas |
Add parameterless overloads of TrimStart/TrimEnd
|
@thiagocamargos, I included these in dotnet/corert#2587 while I was porting my changes from #9009. Apologies if you were already working on it. |
|
@justinvp no problem, I could not work on last couple weeks |
Add parameterless overloads of TrimStart/TrimEnd Commit migrated from dotnet/coreclr@f00766b
Add parameterless overloads of TrimStart/TrimEnd on String.Manipulation.cs, model.xml and ref/mscorlib.cs
Fix https://github.com/dotnet/corefx/issues/6485