Non filePro uplow
Mark K. Getz
mkgetz at shenandoahmutual.com
Thu Jul 17 13:32:28 PDT 2008
> I need to write a uplow edit in vbscript :-) .
>
> VBScript has InStr, UCase, and LCase functions so I know it can be
> done.
>
> Has anyone wrote anything that emulates the uplow edit?
>
> I'm guessing I'll have to make packets of each word, then UCase
> the first letter and LCase the rest.
>
>
>
>
>
Another neat function in VB6 and I believe VBSript is Split.
Words=split("This is a test"," ")
Would split the test "This is a test" in to an array Words
with each element being a word.
Words(0)="This"
Words(1)="is"
Words(2)="a"
Words(3)="test"
Here is the vb6 Code:
Words = Split("This is a test", " ")
For k = 0 To UBound(Words)
Words(k) = LCase(Words(k))
Mid(Words(k), 1, 1) = UCase(Left(Words(k), 1))
OutString = OutString & Words(k) & " "
Next k
OutString = Trim(OutString)
Debug.Print OutString
Produces:
This Is A Test
--
Mark K. Getz mkgetz at shenandoahmutual.com
V.P. of Operations & Treasurer
Shenandoah Mutual Fire Insurance Co.
http://www.shenandoahmutual.com
(540) 459-3421
More information about the Filepro-list
mailing list