STRREPLACE: That means replace your word with word what you want
Code:
[Function strreplace] //<STRREPLACE WORD,NEW_WORD,SENTENCE>
LOCAL.VERI=<ARGV[0]>
LOCAL.NEW= <ARGV[1]>
ARGS=<explode " ",<f_commachange <f_commasep 2,<ARGS>>>>
FOR 0 <eval <ARGV>-1>
LOCAL.CNT=<ARGV[<dlocal._for>]>
LOCAL.STRREPLACE .= " "
IF (STRMATCH(*<LOCAL.VERI>*, <LOCAL.CNT>))
FOR X 0 <eval (strlen(<LOCAL.CNT>))-1>
IF !(<DLOCAL.BLOCK>)
IF (STRMATCH(<LOCAL.VERI>*, <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>))
LOCAL.STRREPLACE .= "<LOCAL.NEW>"
LOCAL.BLOCK <eval STRLEN(<LOCAL.VERI>)-1>
ELSE
LOCAL.STRREPLACE .= "<STRSUB 0 1 <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>>"
ENDIF
ELSE
LOCAL.BLOCK -=1
ENDIF
ENDFOR
ELSE
LOCAL.STRREPLACE .= "<LOCAL.CNT>"
ENDIF
ENDFOR
RETURN <explode "~",<strsub 2 0 <LOCAL.STRREPLACE>>>
Example: <strreplace Hamit,Mehmet,Hamitasd,asdHamit,asdHamitasd,Hamit,Hamit Mehmet Hamitasd>
STRREMOVE: Delete word from a sentence.
Code:
[Function strremove] // <STRREMOVE WORD,SENTENCE>
LOCAL.VERI=<ARGV[0]>
ARGS=<explode " ",<f_commachange <f_commasep 1,<ARGS>>>>
FOR 0 <eval <ARGV>-1>
LOCAL.CNT=<ARGV[<dlocal._for>]>
LOCAL.STRREMOVE .= " "
IF (STRMATCH(*<LOCAL.VERI>*, <LOCAL.CNT>))
FOR X 0 <eval (strlen(<LOCAL.CNT>))-1>
IF !(<DLOCAL.BLOCK>)
IF (STRMATCH(<LOCAL.VERI>*, <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>))
LOCAL.BLOCK <eval STRLEN(<LOCAL.VERI>)-1>
ELSE
LOCAL.STRREMOVE .= "<STRSUB 0 1 <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>>"
ENDIF
ELSE
LOCAL.BLOCK -=1
ENDIF
ENDFOR
ELSE
LOCAL.STRREMOVE .= "<LOCAL.CNT>"
ENDIF
ENDFOR
RETURN <explode "~",<strsub 2 0 <LOCAL.STRREMOVE>>>
Example: <strremove Hamit,Hamitasd,asdHamit,asdHamitasd,Hamit,Hamit Mehmet Hamitasd>
NEEDED FUNCIONS:
Code:
[Function f_commasep] // <F_COMMASEP BAŞLANGIÇ,KELİME,KELİME,KELİME...>
LOCAL.START 1
IF (<dARGV[0]> >= 1) && (<dargv[0]> <= <eval <argv>-1>)
LOCAL.START <DARGV[0]>
ENDIF
FOR <dlocal.start> <eval <ARGV>-1>
LOCAL.RETURN .= ", <ARGV[<dlocal._for>]>"
ENDFOR
RETURN <streat <local.return>>
[Function f_commachange] // <F_COMMACHANGE BAŞLANGIÇ,KELİME,KELİME,KELİME...>
LOCAL.START 1
IF (<dARGV[0]> >= 1) && (<dargv[0]> <= <eval <argv>-1>)
LOCAL.START <DARGV[0]>
ENDIF
FOR <dlocal.start> <eval <ARGV>-1>
LOCAL.RETURN .= "~ <ARGV[<dlocal._for>]>"
ENDFOR
RETURN <streat <local.return>>