Author Topic: Function Replace  (Read 1381 times)

0 Members and 1 Guest are viewing this topic.

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Function Replace
« on: October 06, 2008, 09:17:25 pm »
Script Name: Replace
Script Description Replace area with what is defined
Author: Rampage_Terranius
Compile Test: Passed
Core Version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/

Full Description:
I got annoyed with RegExpReplace replacing every instance of the same word when i only want to replace from one point to another so i designed this to replace instead

Used like so:
Replace(File To Open,Search,SearchEnd,Replace Between search and searchend with this)

use '' instead of a word to signal to use the files length

For example:
From Directory Files/randomfile.ini:
'i have uber spammage powa'

Replace('Files/randomfile.ini','i have','',' been replaced')

will instead change it to: 'i have been replaced'



(Size 636 B)
- http://soldatcentral.com/index.php?page=script&f=54 -


** Script hosted by Soldat Central! Please visit the authors script page and Rate this script **