Changeset 689


Ignore:
Timestamp:
2009/03/12 17:31:06 (3 years ago)
Author:
egtra
Message:

書換禁止のバッファを書き換えるバグを修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/System/Text/StringBuilder.ab

    r629 r689  
    123123                Return This 
    124124            Else 
    125                 Throw New ArgumentNullException("StringBuilder.Append: An argument is null", "s") 
     125                Throw New ArgumentNullException("s") 
    126126            End If 
    127127        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") 
    129129        End If 
    130130        appendCore(s, startIndex, count) 
     
    164164    Const Sub CopyTo(sourceIndex As Long, ByRef dest[] As Char, destIndex As Long, count As Long) 
    165165        If dest = 0 Then 
    166             Throw New ArgumentNullException("StringBuilder.CopyTo: An argument is null", "sourceIndex") 
     166            Throw New ArgumentNullException("sourceIndex") 
    167167        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") 
    169169        End If 
    170170 
     
    174174    Function EnsureCapacity(c As Long) As Long 
    175175        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") 
    177177        ElseIf c > Capacity Then 
    178178            Dim p = GC_malloc_atomic((c + 1) * SizeOf (Char)) As *Char 
     
    397397Public 
    398398    Override Function ToString() As String 
     399        separateBuffer() 
    399400        chars[size] = 0 
    400401        Return New String(This) 
     
    437438            Throw New ArgumentOutOfRangeException("StringBuilder.Chars: An argument is out of range value.", "i") 
    438439        End If 
     440        separateBuffer() 
    439441        chars[i] = c 
    440442    End Sub 
Note: See TracChangeset for help on using the changeset viewer.