« Parsing formulas on the fly via @Eval and @While | Main| AJAX IM for Domino »

Probably useless - LotusScript toAcronym()

Category show-n-tell thursday
Not sure if there's a practical use for this, but if there is, enjoy:

Public Function toAcronym (Byval p_strFullName As String, Byval p_boolPunctuate As Boolean) As String
'Written on a whim by Tim Tripcony on 7/8/2006
    Dim intCharacterCode As Integer   
    Dim strAcronym As String
    Dim strFirstCharacter As String
    Dim varNameWords As Variant
   
    Let varNameWords = Split(p_strFullName)
    Forall strNameWord In varNameWords
        Let strFirstCharacter = Left$(strNameWord,1)
        Let intCharacterCode = Asc(strFirstCharacter)
        If ((intCharacterCode < 91) And (intCharacterCode > 64)) Then 'Only process words beginning with a capital letter
            Let strAcronym = strAcronym & strFirstCharacter
            If p_boolPunctuate Then
                Let strAcronym = strAcronym & "."
            End If
        End If
    End Forall
    Let toAcronym = strAcronym
End Function

Contact Me

Hire Me

Elsewhere

What the Quote?

"...and Jed has dysentery."

Tim Tripcony

"Mmm... translucent bear..."

Brent Bowers

"Some people play the drums too much, then they start singing like they're drums. If you're gonna sing like something, it should be a violin, for God's sake."

Laura Tripcony

"You can't light cigarettes with chapstick... I've tried, it doesn't work."

Pete Oberlin

"I want my MTV, dammit, but you don't hear me bitching... oh wait, that was me bitching."

Steven Rodgers

Apparel

Lotus Rocks

I write the code that makes the young girls cry

Current Terror Alert Level

Assorted Linkage

ClustrMap