TIA.
String service: of_GlobalReplace
File Service: of_FileRead* and of_FileWrite (* this returns an array
of string, but it's easy to add functionality that returns a single
string)
If you don't want to use PFC, you can probably strip the code out.
Good luck,
Terry [TeamSybase] and Sequel the techno-kitten
Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
Version 2.2.06 now available at the Sandbox
See the PB Troubleshooting Guide at the Sandbox
^ ^
o o
=*=
http://www.funduc.com/search_replace.htm
Neil
<Anna> wrote in message news:40a50fb8.5b6...@sybase.com...
global function string f_s_replaceall (string as_source,
string as_lookfor, string as_replacewith);//
________________________________________________________________________________________
int li_start_pos=1,li_len_look_for
li_len_look_for = len(as_lookfor)
// Cherche la première occurence de la chaine
li_start_pos = Pos(as_source,as_lookfor,li_start_pos)
DO WHILE li_start_pos > 0
// Remplace l'occurence trouvée
as_source =
Replace(as_source,li_start_pos,li_Len_look_for,as_replacewith)
// Cherche l'occurence suivante
li_start_pos =
Pos(as_source,as_lookfor,li_start_pos+Len(as_replacewith))
LOOP
return as_source
end function