exist a function to change the first letter Upper and the other lower of a string ?
sample I have ---> PALMA I wish ---> Palma
//------------------
Func _UpperLower( cText )
Local nLen,i,cField
nLen := len( cText )
For i = 1 to Len(cText)
If i = 1
cField := upper(substr(cText,i,1))
Loop
Endif
// check for multiple words
// use space as the delimeter
If substr(cText,i,1) = space(1) // found a space in between words
i++
cField := cField+" "+upper(substr(cText,i,1))
loop
Else
cField := cField+lower(substr(cText,i,1))
Endif
Next
cText := cField
Return(cText)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 75 guests