You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NStack/strings/ustring.cs
+13-6Lines changed: 13 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -481,6 +481,7 @@ public static ustring Make (IEnumerable<Rune> runes)
481
481
returnMake(runes.ToList());
482
482
}
483
483
484
+
/// <summary>
484
485
/// Initializes a new instance of the <see cref="T:NStack.ustring"/> class from an array of uints, which contain CodePoints.
485
486
/// </summary>
486
487
/// <returns>The make.</returns>
@@ -779,7 +780,7 @@ public bool Equals (ustring other)
779
780
/// <summary>
780
781
/// Reports whether this string and the provided string, when interpreted as UTF-8 strings, are equal under Unicode case-folding
781
782
/// </summary>
782
-
/// <returns><c>true</c>, if fold was equalsed, <c>false</c> otherwise.</returns>
783
+
/// <returns><c>true</c>, if fold was equaled, <c>false</c> otherwise.</returns>
783
784
/// <param name="other">Other.</param>
784
785
public boolEqualsFold(ustringother)
785
786
{
@@ -888,7 +889,7 @@ public static ustring Make (byte [] buffer, int start, int count)
888
889
/// Returns the byte at the specified position.
889
890
/// </summary>
890
891
/// <value>The byte encoded at the specified position.</value>
891
-
/// <remarks>The index value shoudl be between 0 and Length-1.</remarks>
892
+
/// <remarks>The index value should be between 0 and Length-1.</remarks>
892
893
public abstract bytethis[intindex]{get;}
893
894
894
895
/// <summary>
@@ -903,7 +904,7 @@ public static ustring Make (byte [] buffer, int start, int count)
903
904
/// Returns a slice of the ustring delimited by the [start, end) range. If the range is invalid, the return is the Empty string.
904
905
/// </summary>
905
906
/// <param name="start">Start index, this value is inclusive. If the value is negative, the value is added to the length, allowing this parameter to count to count from the end of the string.</param>
906
-
/// <param name="iend">End index, this value is exclusive. If the value is negative, the value is added to the length, plus one, allowing this parameter to count from the end of the string.</param>
907
+
/// <param name="end">End index, this value is exclusive. If the value is negative, the value is added to the length, plus one, allowing this parameter to count from the end of the string.</param>
907
908
/// <remarks>
908
909
/// <para>
909
910
/// Some examples given the string "1234567890":
@@ -1011,7 +1012,7 @@ public static ustring Make (byte [] buffer, int start, int count)
1011
1012
/// Utf8 encoded string.
1012
1013
/// </summary>
1013
1014
/// <returns>The substring starting at the specified offset.</returns>
1014
-
/// <param name="start">Starting point, the value is .</param>
1015
+
/// <param name="byteStart">Starting point, the value is .</param>
1015
1016
public ustring Substring (intbyteStart)
1016
1017
{
1017
1018
intlen=Length;
@@ -1166,6 +1167,7 @@ public List<Rune> ToRuneList ()
1166
1167
return result;
1167
1168
}
1168
1169
1170
+
/// <summary>
1169
1171
/// Converts a ustring into a rune array.
1170
1172
/// </summary>
1171
1173
/// <returns>An array containing the runes for the string up to the specified limit.</returns>
@@ -1541,7 +1543,7 @@ public int IndexOfAny (params uint [] runes)
1541
1543
}
1542
1544
1543
1545
/// <summary>
1544
-
/// Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in the uustring.
1546
+
/// Reports the zero-based index position of the last occurrence in this instance of one or more characters specified in the ustring.
1545
1547
/// </summary>
1546
1548
/// <returns>The index position of the last occurrence in this instance where any character in <paramref name="chars" /> was found; -1 if no character in <paramref name="chars" /> was found.</returns>
1547
1549
/// <param name="chars">The string containing characters to seek.</param>
@@ -2170,7 +2172,7 @@ public ustring Replace (ustring oldValue, ustring newValue, int maxReplacements
2170
2172
var oldLen =oldValue.Length;
2171
2173
var newLen =newValue.Length;
2172
2174
2173
-
// Apply replcements to buffer
2175
+
// Apply replacements to buffer
2174
2176
var result =newbyte[Length + maxReplacements *(newValue.Length-oldValue.Length)];
2175
2177
intw=0,start=0;
2176
2178
for(inti=0; i <maxReplacements; i++){
@@ -2196,6 +2198,11 @@ public ustring Replace (ustring oldValue, ustring newValue, int maxReplacements
2196
2198
returnnewByteBufferUString(result);
2197
2199
}
2198
2200
2201
+
/// <summary>
2202
+
/// Represent the null or empty value related to the ustring.
0 commit comments