Need to edge out the competition for your dream job? Train for certifications today.
Private Function BreakString(ByVal str As String, ByVal breakEvery As Integer) As String
Dim sb As New System.Text.StringBuilder(str)
Dim startAt As Integer = str.Length \ breakEvery ' <-- Integer division
For i As Integer = startAt To 1 Step -1
sb.Insert(i * breakEvery, vbCrLf)
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.