Subject |
Re: proper() |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Sun, 13 Apr 2025 11:34:04 +0200 |
Newsgroups |
dbase.getting-started |
On 2025/04/12 14:54, Akshat Kapoor wrote:
.....
>
> If you want output to be "I live in a condo" then in that case use
> breakstring() (it is there in duflp) to break the phrase into sentences
> and then convert the first to upper case followed by rejoining all.
If you save the following as first_upper.prg in your working directory
function first_upper(cStr)
cStr = upper(substr(cStr,1,1))+substr(cStr,2)
return cStr
you can use
x = 'i live in a condo.'
? first_upper(x)
You should actually have a separate folder for all you own functions,
say, C:\My_Functions with a User BDE Alias My_Functions
So, if first_upper.prg isn't in your working directory you would need to use
set procedure to :My_Functions:first_upper.prg to make the function
available to your program.
Mervyn.
|
|