home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1991-12-03 | 474 b | 20 lines |
- Procedure XSTRINGUPPERLOWER[Z$]
- ' By John Smit
- ' Used to convert a string into lower case with each word beginning with
- ' an Upper case letter.
- '
- If Z$="" Then Pop Proc
- Z$=Lower$(Z$)
- Left$(Z$,1)=Upper$(Left$(Z$,1))
- X=Instr(Z$," ")
- While X
- Mid$(Z$,X+1,1)=Upper$(Mid$(Z$,X+1,1))
- X=Instr(Z$," ",X+1)
- Wend
- End Proc[Z$]
- '
- ' example
- Z$="hi there - whATS NEw"
- XSTRINGUPPERLOWER[Z$]
- Print Z$+" (Before)"
- Print Param$+" (After)"