This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Delete a specified number of characters from a string expression.
Syntax
s = STRDELETE$(sMain, start, count)
Returns
String
Parameters
Name |
Type |
Optional |
Meaning |
sMain |
String |
No |
Main string where to delete from |
Start |
Numeric |
No |
Position inside sMain where to start to delete |
Count |
Numeric |
No |
For how many chars to delete |
Remarks
Restrictions
See also
Examples
Thanks to Abraxas for the following script example
Dim sMain As String VALUE "HELLO WORLD"
Dim sNew As String VALUE "TO THE "
Dim StringExpression 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$ (StringExpression , start, count)
sINS = STRINSERT$ (sMain, sNew, position)
sREV = STRREVERSE$(sMain)
sMsg += "sMain = " & sMain & $CRLF
sMsg += "sNew = " & sNew & $CRLF
sMsg += "StringExpression = " & StringExpression & $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