Replaces all characters of a string with the character nCharacter.
Kernel.bdh
Strset( inout sString : string, in nCharacter : number ): string;
the altered string
Parameter | Description |
---|---|
sString | String to be overwritten. This parameter will contain the altered string after the Setset operation |
nCharacter | Defines the character for the operation |
dcltrans transaction TStrset var sString, sResult : string; nChar : number; begin sString := "Hello world!"; nChar := ord('*'); write("string = "); write(sString); writeln; write("char = "); write(chr(nChar)); writeln; sResult := Strset(sString, nChar); write("string = "); write(sString); writeln; write("result = "); write(sResult); writeln; end TStrset;
string = Hello world! char = * string = ************ result = ************