Page 1 of 1
Posted: Thu Jan 30, 2003 12:41 am
by BackupUser
Restored from previous forum. Originally posted by Starax.
Is there a command to place a string within another string?
Example:
S1$="one three"
Mid(S1$,4)="two "
print S1$
> one two three
Posted: Thu Jan 30, 2003 7:11 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Code: Select all
Procedure.s InsertString(source.s,pos,newstring.s)
ProcedureReturn Left(source,pos)+newstring+Right(source,Len(source)-pos)
EndProcedure
OpenConsole()
ReplaceStExample:
S1$ = "one three"
PrintN(S1$)
S1$ = InsertString(S1$,4,"two ")
PrintN(S1$)
Input()
cya,
...Danilo
(registered PureBasic user)
Posted: Thu Jan 30, 2003 7:35 am
by BackupUser
Restored from previous forum. Originally posted by Fangbeast.
Starax Danilo's example is a good start but also do a search for Franco's templates as he had lots of these sorts of examples and it got me started last year. They will be somewhere here in the forum still (I hope) and/or on Paul's resource site.
Fangles woz ear orright den?
Posted: Thu Jan 30, 2003 5:45 pm
by BackupUser
Restored from previous forum. Originally posted by Starax.
Thanks chaps.