ccFandR

Syntax

Uint = ccFandR(Target:String,Where:String,With:String,RetValue:Pointer,OPT Pos = 1:Uint,OPT CaseS = True:Uint,OPT LR = "L":Char,OPT Count = 0:Uint)

Description

Finds in 'Target' and Replace 'Where' with 'With'

Parameters

Target - String to perform the search on.
Where - String to search for.
With - String to replace with.
RetValue - A pointer to the returning string.
Pos - The starting position the search performed from.
CaseS - True = CaseSensitive search.
LR - (L)eft or (R)ight the search start from. (It has only effect if 'Count' isn't =0)
Count - A counter for 'Where' by Count = 0 all 'Where' will be replaced.

Return value

The number of changes took place.
The function places the return string into that through the calling procedure reserved memory block.

Remarks

You can make changes in the original String or Istring if you have enough place in it like that:
ccFandR(Orig$,"*","X",Orig$)
which will change all "*" to "X" in Orig$

Example usage

PRINT ccFandR(A,"SAMPLE","Whatever",RetV,10,false,"L",2)

See
ccFandR_Demo.eba