Skip to main content
Version: 1.0.0

deleteString

deleteString ( source : string , where : integer , numChars : integer ) : string

ParameterTypeDescription
sourcestring→String from which to delete characters
whereinteger→First character to delete
numCharsinteger→Number of characters to delete
Resultstring←Resulting string

Description​

deleteString deletes numChars from source, starting at where, and returns the resulting string.

deleteString returns the same string as source when:

  • source is an empty string
  • where is greater than the length of source
  • numChars is zero (0)

If where is less than one, the characters are deleted from the beginning of the string.

If where plus numChars is equal to or greater than the length of source, the characters are deleted from where to the end of source.

Example​

 var vtResult, vtOtherVar : string
vtResult = deleteString("Lamborghini",6,6) // vtResult gets "Lambo"
vtResult = deleteString("Indentation",6,2) // vtResult gets "Indention"
vtResult = deleteString(vtOtherVar,3,32000) // vtResult gets the first two characters of vtOtherVar

See also​

changeString
insertString
replaceString