| |
|
|
Julian Schmidt | wish: commands circa a Teilstring To delete
passing Solution:
CLS
print "String: 1,2,3,4,5,6,7,8,9"
print "Teilstring 8 löschen"
print "Ergebnis: "+DelSubStr("1,2,3,4,5,6,7,8,9",8,",")
Waitinput
Proc DelSubStr
Parameters Text$,Teil&,Trenn$
Declare Text2$
whileloop Len(Text$,Trenn$)
Text2$=Text2$+If((&loop<>If(Teil&<>1,1,2)) and (&loop<>Teil&),Trenn$,"")+If(&loop<>Teil&,SubStr$(Text$,&loop,Trenn$),"")
Endwhile
Return Text2$
ENDPROC
|
|
|
| |
|
|
|
RGH | Hi, the can still schonj The function Del$:
print "Ergebnis: "+Del$("1,2,3,4,5,6,7,8,9",8,1,",")
tappt im dunkeln can even a little bit More, there too several Teilstrings deleted go can.
Greeting Roland |
|
|
| XProfan X2Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 01/01/13 ▲ |
|
|
|
|
Julian Schmidt | is correct!
RGH (01.01.13)
tappt im dunkeln can even a little bit More, there too several Teilstrings deleted go can.
won't in the Help erwähnt. example? |
|
|
| |
|
|
|
Jörg Sellmeyer |
example?
print "Ergebnis: "+Del$("1,2,3,4,5,6,7,8,9",6,2,",")
WaitInput
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 01/01/13 ▲ |
|
|
|
|
RGH | in the first becomes it in the Help erwähnt and secondly is the dritte Parameter The Number of characters or. Teilstrings, The removes go!
Quote from the Help: "If one Separator indicated is: ex the Teilstring-position n1 go n2 Teilstrings from the String removes."
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 01/01/13 ▲ |
|
|
|