String aufteilen

[ Go to bottom  |  Go to latest post  |  Subscribe to this topic  |  Latest posts first ]


Paradox
Admin

60, male

Posts: 23

String aufteilen

from Paradox on 02/01/2009 08:32 PM

Proc 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

Reply

« Back to forum