user function exemplo()
Local i, nTam , nLin, nLin2
Local cString
cString := "Lorem ipsum dolor sit amet, urna nullafusce vehicula porttitor lobortis "
cString += "sapien, eget taciti nam tincidunt viverra saepe, eleifend et neque "
cString += "justonunc adipiscing. Eget eu ut sed est sed accumsan, sit sed ultrices id "
cString += "scelerisque ullamcorper at, sodales accumsan et per blandit et, enim "
cString += "porta metus voluptatem luctus wisi, vel nunc tellus pellentesque "
cString += "tincidunt urn."
nTam := len(cString)
conout( "Tamanho da String = " + cValToChar(nTam))
nLin := mlcount(cString,40)
conout( "Total de Linhas ( sem quebrar palavras ) = " +cValToChar( nLin ))
For i := 1 to nLin
conout( "Linha "+ str(i,2) +" ["+memoline(cString,40,i)+"]")
Next
nLin2 := mlcount(cString,40,,.F.)
conout( "Rotal de Linhas ( quebrando as palavras ) = " +cValToChar( nLin2 ))
For i := 1 to nLin2
conout( "Linha "+ str(i,2) +" ["+memoline(cString,40,i,,.F.)+"]")
Next
Return