with capitalized record. Is there a function to convert all records in lower case? except of course the first letter which must remain in uppercase
- Code: Select all Expand view
- #include "Fivewin.ch"
Function Test()
cDesc:= ""
use soggetti alias so
GO TOP
Do while ! so->(eof())
cDesc := Stringlower( so->etnombre, " ")
replace so->etnombre with cDesc
so->(Dbskip())
Enddo
xbrowse()
return nil
//------------------------------------------------------//
STATIC FUNCTION Stringlower( string, parser )
Local cStr:= "", nLenPar:= Len( parser )
Local commapos := 0
If parser == NIL .OR. parser == "e"
parser := " "
EndIf
Do While Len( string ) > 0
commapos := at( parser, string )
IF commapos > 0
cStr+= Lower(Left( string, commapos - 1 )) + " "
string := Lower(SubStr( string, commapos + Len( parser ) ))
ELSE
cStr+= string
string := ''
ENDIF
ENDDO
RETURN( cStr )
But I hae all record on lower case as you can see on this picture
I wish Have the first letter on uppercase