SP>Output:
SP> Max The Dog
For your first one, see LTRIM$ internal to powerbasic.
Second one is below.
Function FirstUpper$ (DoThis$)
' Check to see if it is null
If Len(DoThis$) 0 Then
DoThis$ = lCase$(DoThis$) ' Switch all to lower case
'acronyms common to your business
replace "csg" with "CSG" in dothis$
replace "cuna" with "CUNA" in dothis$
replace "fcul" with "FCUL" in dothis$
replace "fsg" with "FSG" in dothis$
' See how many words need to be capalitized
Do
LastCheck% = LastCheck% + 1
Temp$ = Mid$(DoThis$, LastCheck%, 1)
Mid$(DoThis$, LastCheck%, 1) = UCase$(Temp$)
LastCheck% = InStr(LastCheck% , DoThis$,any ";:., /\")
Loop While LastCheck%
Else
Exit Function
End If
FirstUpper = DoThis$ 'Return the answer
End Function
---
SLMR 2.1a Life would be easier if we could look at the source code.
--- PCBoard (R) v15.22 (OS/2) 10
---------------
* Origin: (1:3605/13)
|