Hi,
Exist or not functions to convert array to str and str to array ? Can't find at this moment ... If not exist , maybe you can share with working solution ?
Thanks !
Rimantas U.
Hi,
Exist or not functions to convert array to str and str to array ? Can't find at this moment ... If not exist , maybe you can share with working solution ?
Thanks !
#include "FiveWin.ch"
extern HBCharacter
function Main()
local c := "Hello"
ASSOCIATE CLASS String WITH TYPE Character
MsgInfo( c[ 1 ] )
MsgInfo( c )
return nil
CLASS String
METHOD GetChar( nIndex ) OPERATOR "[]"
METHOD ClassName() INLINE "CHARACTER"
ENDCLASS
METHOD GetChar( nIndex ) CLASS String
return SubStr( Self, nIndex, 1 )FUNCTION SaveArray2String (aArray)
LOCAL i
LOCAL c := ""
FOR i := 1 TO Len (aArray)
c += aArray[i]+";"
NEXT
c := Left (c, Len(c)-1) // remove the last ;
RETURN (c)StefanHaupt wrote:Rimantas,
simple function to save an array into a string, the fields separated with ";"
Antonio Linares wrote:Rimantas,
This may help you:
#include "FiveWin.ch" extern HBCharacter