Viva Clipper !

POSDEL()

Advertisements

POSDEL()

Delete characters at a certain position within a string

Syntax

       POSDEL(<cString>,[<nStartPos>],[<nNumber>])
              --> cString

Arguments

<cString> Designates the character string from which the characters are deleted.

<nStartPosition> Designates from which position the deletion begins.

<nNumber> Designates the number of characters to delete.

Returns

The modified string is returned.

Description

This function permits the removal of <nNumber> of characters from <cString>, beginning from <nStartPos>.

Note

. <nStartPos> is optional. If this parameter is not specified, then POSDEL() begins at the end of the <cString> and deletes the specified number (<nNumber>) of characters.

Examples

       .  Delete two characters from a string:
              ? POSDEL("Parameter", 3, 2)         // "Pameter"
           .  Delete the last two characters:
              ? POSDEL("Parameter", , 2)          // "Paramet"

Compliance

POSDEL() is compatible with CT3’s POSDEL().

Platforms

All

Files

Source is pos2.c, library is libct.

Seealso

POSCHAR(), POSINS(), POSREPL()

Advertisements

Advertisements