Changeset 689
- Timestamp:
- Mar 12, 2009, 5:31:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/Text/StringBuilder.ab
r629 r689 123 123 Return This 124 124 Else 125 Throw New ArgumentNullException(" StringBuilder.Append: An argument is null", "s")125 Throw New ArgumentNullException("s") 126 126 End If 127 127 ElseIf startIndex < 0 Or count < 0 Then 128 Throw New ArgumentOutOfRangeException(" StringBuilder.Append: One or more arguments are out of range value.", "startIndex or count or both")128 Throw New ArgumentOutOfRangeException("startIndex or count or both") 129 129 End If 130 130 appendCore(s, startIndex, count) … … 164 164 Const Sub CopyTo(sourceIndex As Long, ByRef dest[] As Char, destIndex As Long, count As Long) 165 165 If dest = 0 Then 166 Throw New ArgumentNullException(" StringBuilder.CopyTo: An argument is null", "sourceIndex")166 Throw New ArgumentNullException("sourceIndex") 167 167 ElseIf size < sourceIndex + count Or sourceIndex < 0 Or destIndex < 0 Or count < 0 Then 168 Throw New ArgumentOutOfRangeException(" StringBuilder.CopyTo: One or more arguments are out of range value.", "startIndex or count or both")168 Throw New ArgumentOutOfRangeException("startIndex or count or both") 169 169 End If 170 170 … … 174 174 Function EnsureCapacity(c As Long) As Long 175 175 If c < 0 Or c > MaxCapacity Then 176 Throw New ArgumentOutOfRangeException(" StringBuilder.Append: An argument is out of range value.", "c")176 Throw New ArgumentOutOfRangeException("c") 177 177 ElseIf c > Capacity Then 178 178 Dim p = GC_malloc_atomic((c + 1) * SizeOf (Char)) As *Char … … 397 397 Public 398 398 Override Function ToString() As String 399 separateBuffer() 399 400 chars[size] = 0 400 401 Return New String(This) … … 437 438 Throw New ArgumentOutOfRangeException("StringBuilder.Chars: An argument is out of range value.", "i") 438 439 End If 440 separateBuffer() 439 441 chars[i] = c 440 442 End Sub
Note:
See TracChangeset
for help on using the changeset viewer.