Page 1 of 1

Re: AddStringField() or InsertString()

Posted: Wed Aug 19, 2015 4:39 pm
by Kwai chang caine
Hello FRED !!! :D

No no ...that's not talking about GIF :shock:

I have run, i have run,
Image
and hope i not come too late for the 5.40 :mrgreen: :lol:

Code: Select all

Procedure.s AddStringField(Sentence.s, Index, Separator.s, Text.s)
  
 MaxSeparator = CountString(Sentence, Separator)
  
 For a = 1 To MaxSeparator + 1
  
  If a <> Index
   Temp$ + StringField(Sentence, a, Separator) + Separator
  Else
   Temp$ + Text + Separator
  EndIf
  
 Next
 
 ProcedureReturn Temp$
 
EndProcedure

Debug AddStringField("Hello it's a good day for asking a new function to FRED", 3, " ", "ADDED")
Thanks for all your great job 8)

Re: AddStringField()

Posted: Wed Aug 19, 2015 5:32 pm
by Thunder93
InsertString() should of had this ability. :wink:

Re: AddStringField()

Posted: Wed Aug 19, 2015 9:44 pm
by Kwai chang caine
Hello thunder93 :D

Why not :wink:
The most important is the function no 8)

And again for InsertString i see better a function who insert a string at a special place
Like that

Code: Select all

InsertString (Sentence.s, StringToInsert.s, position)

InsertString (Thunder93Kcc, 9, " and ")

Result
Thunder93 and Kcc
Have a good night