xHarbour Reference Documentation > Function Reference |
Inserts characters between all characters in a string.
Expand( <cString>, ; [<nCount>], ; [<xChar>] ) --> cResult
The function iterates <cString>, inserts the character sequence Replicate( <xChar>, <nCount> ) between characters of <cString>, and returns the expanded result.
See also: | CharSpread(), PadLeft(), PadRight() |
Category: | CT:String manipulation , Character functions |
Source: | ct\spread.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example displays results of Expand() PROCEDURE Main LOCAL cStr1 := "xHarbour" LOCAL cStr2 := "ABCD" ? Expand( cStr1 ) // result: x H a r b o u r ? Expand( cStr2, 3, "." ) // result: A...B...C...D RETURN
http://www.xHarbour.com