String aufteilen
[ Go to bottom | Go to latest post | Subscribe to this topic | Latest posts first ]
String aufteilen
from Paradox on 02/01/2009 08:32 PMProc Zerlege1
Parameters Text$,Trenner$
Declare Ergebnis$
WhileLoop Len(Text$)
Ergebnis$ = Ergebnis$ + Mid$(Text$,&Loop,1) + Trenner$
Wend
Return Ergebnis$
EndProc
Proc Zerlege2
Parameters Text$,Trenner$
Declare Ergebnis$
WhileLoop Len(Text$)
Ergebnis$ = Ergebnis$ + SubStr$(Text$,&Loop) + Trenner$
EndWhile
Return Ergebnis$
EndProc
Cls
Var a& = &GetTickCount
Print Zerlege1("ABCDEFGHIJKLMNOP","|")
Print &GetTickCount - a&
a& = &GetTickCount
Print Zerlege2("0123456789012345","|")
Print &GetTickCount - a&
WaitInput
Parameters Text$,Trenner$
Declare Ergebnis$
WhileLoop Len(Text$)
Ergebnis$ = Ergebnis$ + Mid$(Text$,&Loop,1) + Trenner$
Wend
Return Ergebnis$
EndProc
Proc Zerlege2
Parameters Text$,Trenner$
Declare Ergebnis$
WhileLoop Len(Text$)
Ergebnis$ = Ergebnis$ + SubStr$(Text$,&Loop) + Trenner$
EndWhile
Return Ergebnis$
EndProc
Cls
Var a& = &GetTickCount
Print Zerlege1("ABCDEFGHIJKLMNOP","|")
Print &GetTickCount - a&
a& = &GetTickCount
Print Zerlege2("0123456789012345","|")
Print &GetTickCount - a&
WaitInput

Reply