Mistake in comment
shiyakohn opened this issue · 1 comments
shiyakohn commented
Where it says whitespace is a copy paste from the helper method that handles whitespace trimming
referencesource/mscorlib/system/string.cs
Lines 2769 to 2803 in a48449c
private String TrimHelper(char[] trimChars, int trimType) { | |
//end will point to the first non-trimmed character on the right | |
//start will point to the first non-trimmed character on the Left | |
int end = this.Length-1; | |
int start=0; | |
//Trim specified characters. | |
if (trimType !=TrimTail) { | |
for (start=0; start < this.Length; start++) { | |
int i = 0; | |
char ch = this[start]; | |
for( i = 0; i < trimChars.Length; i++) { | |
if( trimChars[i] == ch) break; | |
} | |
if( i == trimChars.Length) { // the character is not white space | |
break; | |
} | |
} | |
} | |
if (trimType !=TrimHead) { | |
for (end= Length -1; end >= start; end--) { | |
int i = 0; | |
char ch = this[end]; | |
for(i = 0; i < trimChars.Length; i++) { | |
if( trimChars[i] == ch) break; | |
} | |
if( i == trimChars.Length) { // the character is not white space | |
break; | |
} | |
} | |
} | |
return CreateTrimmedString(start, end); | |
} |
danmoseley commented
Hi there, we aren't taking fixes to this code in this repo. Thanks for the report.