BBS: Inland Empire Archive Date: 05-13-92 (14:48) Number: 94 From: JEAN CREPEAU Refer#: NONE To: EDDIE ROWE Recvd: NO Subj: Better Way? Conf: (2) Quik_Bas
In a message to ALL, EDDIE ROWE wrote:
ER=> I'm trying to write a routine that will take a string from another
program which converts everything to ALL CAPS back to a form that is
more pleasing to the eye. This relys on the string having two
components (in my case a FirstName LastName). Anyone have a pointer or
two to share to clean this up so it can take however many different
parts its needs and maybe a bit simpler?
Here is a subroutine that will convert your string into lower case
you name. The function will convert all the characters of the string into
lower case except the first character of the string and the ones following
a space.
FUNCTION ToLower$(x$)
u$=lcase$(x$)
p=0
DO
mid$(u$,p+1,1)=ucase$(mid$(u$,p+1,1))
p=instr(p+1,u$," ")
LOOP UNTIL p=0
ToLower$=u$
ENd FUNCTION
If you want the best way to do it, you can use assembly. If you are
interested, just drop me a line, I'll post the precedure you need.
Jean
---
* Origin: INTERACESS Montreal (QC) Canada (514) 528-1415 (1:167/280)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET