On Sep 5, 2006, at 7:45 AM, Carlos M wrote:


 For i = 0 To numChars
  char = arrChar(i)
  Do
   oldLen = newLen
   If caseSensitive Then
    s = ReplaceAllB(s, char + char, char)
   Else
    s = ReplaceAll(s, char + char, char)
   End if
   newLen = Len(s)
  Loop Until newLen = oldLen
 Next


Won't make much difference but:

If caseSensitive Then

 For i = 0 To numChars
  char = arrChar(i)
   Do

     oldLen = newLen
     s = ReplaceAllB(s, char + char, char)
     newLen = Len(s)
   Loop Until newLen = oldLen

 Next

Else ' Not case sensitive

 For i = 0 To numChars
  char = arrChar(i)

  Do
    oldLen = newLen
    s = ReplaceAll(s, char + char, char)
    newLen = Len(s)
  Loop Until newLen = oldLen

 Next

End if

Would be marginally faster

- Karen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to