Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Annoyance] Correct Grammar
#3
Just for the fun of it, since we're fixing grammar mistakes.

I before E except after C

Code:
Dim Loc As Integer
  
    If InStr(1, Word, "ei")  0 Or InStr(1, Word, "ie")  0 Then
        For Loc = 2 To Len(Word)
            If Mid(Word, Loc, 2) = "ie" And Mid(Word, Loc - 1, 1) = "c" Then
                Word = Left(Word, Loc - 1) & "ei" & Right(Word, Len(Word) - Loc - 1)
            ElseIf Mid(Word, Loc, 2) = "ei" And Mid(Word, Loc - 1, 1)  "c" Then
                Word = Left(Word, Loc - 1) & "ie" & Right(Word, Len(Word) - Loc - 1)
            End If
        Next Loc
    End If

(I know there are exceptions, but eh Tongue)


Btw Robin, hourglass is a noun, but it's one of the few exceptions that use an that doesn't start by a vowel.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)