center,centre,vcenter,vcentre

Declaration

cstring function center(cstring S, Char(1) C ,Integer I)

cstring function centre(cstring S, Char(1) C ,Integer I)

varchar function vcenter(varchar S, Char(1) C ,Integer I)

varchar function vcentre(varchar S, Char(1) C ,Integer I)

Description

Center returns a string of length I by adding characters C equally to the front and back of String S. .Note that centre and vcentre call the same DLL functions as center and vcenter. They are provided as a convenience.

Example Stored Procedure

CREATE PROCEDURE test_vcenter(S varchar(30), C char(1),I Integer)

RETURNS (result varchar(30)) AS

BEGIN

result = vcenter(S,C,I);

END!!

WISQL - calling the example stored procedure

execute procedure test_vcenter("abcd","1",10);

RESULT

==============================

111abcd111

execute procedure test_vcenter("abcd","1",1);

RESULT

==============================

Bad paramaters in center