Skip to content

Commit f58af11

Browse files
authored
spaces cleanup
1 parent 709bdcf commit f58af11

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

StrTr.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ public static string StrTr(this string src, string fromChars, string toChars)
3939
// string, string (with array of Tuples), Ordinal
4040
public static string StrTr(this string src, params (string, string)[] replacePairs)
4141
{
42-
string newsrc = src.StrTr(replacePairs, StringComparison.Ordinal);
43-
return newsrc;
42+
string newsrc = src.StrTr(replacePairs, StringComparison.Ordinal);
43+
return newsrc;
4444

4545
}
4646

4747

4848
/********************************* IEnumerable **********************************/
4949

50-
// string => string (with IEnumerable of KeyValuePairs<string, string>)
50+
// string => string (with IEnumerable of KeyValuePairs<string, string> and StringComparison)
5151
public static string StrTr(this string src, IEnumerable<KeyValuePair<string, string>> replacePairs, StringComparison mode = StringComparison.Ordinal)
5252
{
5353
StringBuilder sb = new StringBuilder();
5454
int srcoffs = 0;
5555
string srctail;
5656
bool done;
57-
IEnumerable<KeyValuePair<string, string>> orderedPairs = replacePairs.Where(rp => rp.Key != "").OrderByDescending(rp => rp.Key.Length);
57+
IEnumerable<KeyValuePair<string, string>> orderedPairs = replacePairs.Where(rp => rp.Key != "").OrderByDescending(rp => rp.Key.Length);
5858
while (srcoffs < src.Length)
5959
{
6060
srctail = src.Substring(srcoffs);
@@ -79,14 +79,14 @@ public static string StrTr(this string src, IEnumerable<KeyValuePair<string, str
7979
}
8080

8181

82-
// string => string (with IEnumerable of Tuples<string, string>)
82+
// string => string (with IEnumerable of Tuples<string, string> and StringComparison)
8383
public static string StrTr(this string src, IEnumerable<(string, string)> replacePairs, StringComparison mode = StringComparison.Ordinal)
8484
{
8585
StringBuilder sb = new StringBuilder();
8686
int srcoffs = 0;
8787
string srctail;
8888
bool done;
89-
IEnumerable<(string, string)> orderedPairs = replacePairs.Where(rp => rp.Item1 != "").OrderByDescending(rp => rp.Item1.Length);
89+
IEnumerable<(string, string)> orderedPairs = replacePairs.Where(rp => rp.Item1 != "").OrderByDescending(rp => rp.Item1.Length);
9090
while (srcoffs < src.Length)
9191
{
9292
srctail = src.Substring(srcoffs);
@@ -112,14 +112,14 @@ public static string StrTr(this string src, IEnumerable<(string, string)> replac
112112

113113

114114

115-
// string => string (with IEnumerable of KeyValuePairs<string, string>)
115+
// string => string (with IEnumerable of KeyValuePairs<string, string> and CultureInfo)
116116
public static string StrTr(this string src, IEnumerable<KeyValuePair<string, string>> replacePairs, bool ignoreCase, System.Globalization.CultureInfo culture = null)
117117
{
118118
StringBuilder sb = new StringBuilder();
119119
int srcoffs = 0;
120120
string srctail;
121121
bool done;
122-
IEnumerable<KeyValuePair<string, string>> orderedPairs = replacePairs.Where(rp => rp.Key != "").OrderByDescending(rp => rp.Key.Length);
122+
IEnumerable<KeyValuePair<string, string>> orderedPairs = replacePairs.Where(rp => rp.Key != "").OrderByDescending(rp => rp.Key.Length);
123123
while (srcoffs < src.Length)
124124
{
125125
srctail = src.Substring(srcoffs);
@@ -144,14 +144,14 @@ public static string StrTr(this string src, IEnumerable<KeyValuePair<string, str
144144
}
145145

146146

147-
// string => string (with IEnumerable of Tuples<string, string>)
147+
// string => string (with IEnumerable of Tuples<string, string> and CultureInfo)
148148
public static string StrTr(this string src, IEnumerable<(string, string)> replacePairs, bool ignoreCase, System.Globalization.CultureInfo culture = null)
149149
{
150150
StringBuilder sb = new StringBuilder();
151151
int srcoffs = 0;
152152
string srctail;
153153
bool done;
154-
IEnumerable<(string, string)> orderedPairs = replacePairs.Where(rp => rp.Item1 != "").OrderByDescending(rp => rp.Item1.Length);
154+
IEnumerable<(string, string)> orderedPairs = replacePairs.Where(rp => rp.Item1 != "").OrderByDescending(rp => rp.Item1.Length);
155155
while (srcoffs < src.Length)
156156
{
157157
srctail = src.Substring(srcoffs);

0 commit comments

Comments
 (0)