Page 1 of 1

Posted: Sat Jul 14, 2001 3:32 am
by BackupUser
Restored from previous forum. Originally posted by wayne1.

;LeadingCaps procedure changes mixed case to starting capital.
;Modify as needed (change delimeter to another?)
initrequester()

s$= "THIS iS a teSt."

Procedure.s LeadingCaps(string.s)
period.s="."
phrase.s=Lcase(string)
pos.w=0
exitWhile.b=0
phrase=Ucase(Left(string,1))+Mid(phrase,2,Len(phrase))
While exitWhile -1
pos=FindString(phrase,period,pos+1)
If pos0
phrase=Left(phrase,pos+1)+Ucase(Mid(phrase,pos+2,1))+Mid(phrase,pos+3,Len(phrase))
Else
exitWhile=-1
EndIf
Wend
ProcedureReturn phrase
EndProcedure

q$=LeadingCaps(s$)
MessageRequester("",q$,0)






Edited by - wayne1 on 15 July 2001 04:19:28