strDel Function

Creates a copy of a string with the specified substring removed.


str strDel(
    str _text,
    int _position,
    int _number)

Parameter

Description

_text

The string to copy from

_position

The position at which to begin ignoring characters during the copy.

_number

The number of characters to ignore.

A minus in front of _number parameter indicates that the (_number-1) characters before the character at the _position parameter are to be removed along with the character at the _position.

The remaining characters copied from the string.

strdel is complementary to substr.

// Returns the text string AEFGH.
strDel("ABCDEFGH",2,3);
 
// Returns the text string ABCGH.
strDel("ABCDEFGH",4,3);

Community Additions

ADD
Show: