IfFullWord

Returns True if found as full, False if not found as full
Full word means word is between two spaces ; , : . ( ) or between > and <
Or any combination of above
Important: Word_PlusMinus1 has the word with 1 character before and 1 character after to be checked.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function IfFullWord(Word_PlusMinus1)
    ' Returns word if found as full, blank if not found as full
    ' Full word means word was found between two spaces ; , : . ( ) or between > and <
    '        Or any combination of above
    '
    ' Needs IfFoundInList
    ' Word_PlusMinus1 has the word with 1 character before and 1 character after
    '
    W1W9 = 0
    Rett = False
    Char1 = Left(Word_PlusMinus1, 1) ' 1st char
    Char9 = Right(Word_PlusMinus1, 1) ' last char
    If IfFoundInList(Char1, ",| |.|;|:|(|)| <| >|$|&|=|-|!|#|/|\|?", "|") Then W1W9 = W1W9 + 1
    If IfFoundInList(Char9, ",| |.|;|:|(|)| <| >|$|&|=|-|!|#|/|\|?", "|") Then W1W9 = W1W9 + 1
    If W1W9 = 2 Then Rett = True ' Mid(Word_PlusMinus1, 2, Len(Word_PlusMinus1) - 2)
    IfFullWord = Rett
End Function

Word_PlusMinus1

Views 128

Downloads 55

CodeID
DB ID