Hi guys,

How do I check if the last character in a string that was appended to a long string is a "}" ?


Code:
  Dim AnimMainStr As New System.Text.StringBuilder


Dim firstItems  As String = "$('#" & triggerId & "').click(function(){" & vbCrLf & _
                                vbTab & " $('#" & targetId & "').animate({ " 

        AnimMainStr.Append(firstItems.ToString)

        If IsWidth Then
            AnimMainStr.Append(vbCrLf & vbTab & vbTab & prpt3)
        End If
        If IsHeight Then
            AnimMainStr.Append("," & vbCrLf & vbTab & vbTab & prpt4)
        End If
I basicaly need to prevent inserting a comma "," before a property if the property is the first one, and in case the user only selects one property.
I know I have to use some kind of Regex , but i'm new to vb any ideias? Or is there another and more elegant solution than Regex.

Thanks,
Mike