PDA

View Full Version : Usage of STRDELETE$ STRINSERT$ STRREVERSE$ Keywords



Michael Clease
29-05-2007, 13:26
' Usage of STRDELETE$ STRINSERT$ STRREVERSE$
'
' Written by Abraxas

DIM sMain as string value "HELLO WORLD"
DIM sNew as string value "TO THE "
DIM String_expression as string Value sMain
DIM sDEL as STRING
DIM sINS AS STRING
DIM sREV as STRING
DIM sSTR AS STRING
DIM Start as DWORD VALUE 4
DIM count as DWORD VALUE 7
DIM position as DWORD Value 7
DIM sMsg as string

sDEL = STRDELETE$ (string_expression, start, count)
sINS = STRINSERT$ (sMain, sNew, position)
sREV = STRREVERSE$(sMain)

sMsg += "sMain = " & sMain & $CRLF
sMsg += "sNew = " & sNew & $CRLF
sMsg += "StringExpression = " & String_Expression & $CRLF & $CRLF
sMsg += "Start = " & Start & $CRLF
sMsg += "Count = " & count & $CRLF
sMsg += "Position = " & position & $CRLF & $CRLF

sMsg += "STRDELETE$(string_expression, start, count) = " & sDEL & $CRLF & $CRLF
sMsg += "STRINSERT$(sMain, sNew, position) = " & sINS & $CRLF & $CRLF
sMsg += "STRREVERSE$(sMain) = " & sREV & $CRLF & $CRLF

MsgBox 0, sMsg

ErosOlmi
29-05-2007, 15:47
Got it.