| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Deletes character(s) at a specified position in a string.
PosDel( <cString>, [<nPos>], [<nCount>] ) --> cResult
The function removes the requested numnber of characters and returns the modified string.
| See also: | AtRepl(), PosIns(), PosRange(), Stuff() |
| Category: | CT:String manipulation , Character functions |
| Source: | ct\pos2.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays results of PosDel()
PROCEDURE Main
LOCAL cString := "xHarbour"
? PosDel( cString ) // result: xHarbou
? PosDel( cString, 3, 2 ) // result: xHbour
? PosDel( cString, , 3 ) // result: xHarb
RETURN
http://www.xHarbour.com