StrDelete

Navigation:  Appendices > Macro Language > Built-in Functions > All Functions (Alphabetical) >

StrDelete

Previous pageReturn to chapter overviewNext page

str = StrDelete(sString,nStart,nLength)

 

This macro function deletes characters from sString, starting at the position nStart for nLength characters.

 

StrDelete('Hello',2,1) = 'Hllo'

StrDelete('Hello',2,3) = 'Ho'

StrDelete('Hello',2,4) = 'H'

StrDelete('Hello',2,1000) = 'H'

StrDelete('Hello',1000,3) = 'Hello' // no deletion

 

You do not have to check if the values you are passing for nStart and nLength are too high. If they are, they will be ignored (see examples above).

 

Note how StrDelete is complementary to StrCopy; if you look at the examples below you will notice that what is deleted from a string using StrDelete, is exactly what would have been copied with StrCopy, assuming the same parameters.

 

See also : StrCopy.


Topic 108276 updated on 05-Mar-2002.
Topic URL: http://www.qppstudio.net/webhelp/index.html?strdelete.htm