It is currently Sun May 28, 2017 3:35 am

Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: REPLACE1$ - replace string that only has one occurrence
Unread postPosted: Sun Nov 08, 2015 8:30 pm 

Joined: Wed Apr 15, 2015 3:57 am
Posts: 440
This seems to run faster than REPLACE$ on big text strings when you only want
to replace one occurrence of a string which is handy for injecting text/html code when
building up html files.

FN.DEF REPLACE1$(s$,f$,r$)
LET i=IS_IN(f$,s$)
fn.rtn left$(S$,I-1) + r$ + RIGHT$(S$,LEN(S$)-LEN(F$)-I+1)

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: