Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - Stuff$

Posted in WinTask

'
' Stuff$()
'

' Author: Joe Strazzere
'


'

' Stuff$(Target$, iPos, iLen, Replace$)
'
' Replace iLen characters in the target string Target$, beginning at iPos
' with the string Replace$

 

Function Stuff$(Target$, iPos, iLen, Replace$)
    Stuff$=Left$(Target$, iPos-1)+Replace$+Right$(Target$, Len(Target$)-iPos-iLen+1)
EndFunction

 

Msgbox("Insert   "    +Stuff$("abcdef",2,0,"123"),,"Stuff$")    ' a123bcdef

Msgbox("Replace   "    +Stuff$("abcdef",2,3,"123"),,"Stuff$") ' a123ef

Msgbox("Delete   "    +Stuff$("abcdef",2,2,""),,"Stuff$")  ' adef

Msgbox("Replace/Insert   "+Stuff$("abcdef",2,1,"123"),,"Stuff$") ' a123cdef

Msgbox("Replace/Delete   "+Stuff$("abcdef",2,4,"123"),,"Stuff$") ' a123f


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now