ScriptUO

Official ScriptUO EasyUO Scripts => Script Snippets => Topic started by: KilroyIsDead on June 24, 2009, 03:12:53 PM

Title: More String Subs "ReplaceString"
Post by: KilroyIsDead on June 24, 2009, 03:12:53 PM
There are two subs in this library
StringReplace
ConvertSpacesToSpaces

There is a number of sample calls that you should remove if you want to use this

Code: [Select]
;=================================================================
; Subroutine: ConvertSpacesToSpaces
; Author: Paul Erickson
; Version: 0.20b
; Purpose: This routine will accept any amount of text that may
;          spaces within in and convert them to #spc
;
; Parameters:
;       %1 req I need at least one value or I'll call you stoopid!
;       %2+ opt All other parameter are just the rest of the
;               string to be stitched together
;
; Revision History:
; 000 PAE 06/24/2009 Initial routine
;=================================================================


Code: [Select]
;=================================================================
; Subroutine: StringReplace
; Author: Paul Erickson
; Version: 0.20b
; Purpose: This routine will an original string, a set of
;          characters (1 to a lot) to search for and a set of
;          characters (1 to a lot) to replace them with.
;
; Parameters:
;       %1 req I need at least one value or I'll call you stoopid!
;       %2 opt What is the set of characters to be replaced; I
;              call this optional but without it there's really
;              no work to be done
;       %3 opt What is the set of characters to replace the find
;              string with.  If you pass nothing I basically
;              remove the find string
;
; Revision History:
; 000 PAE 06/24/2009 Initial routine
;=================================================================code]