alltrimc,valltrimc

Declaration

cstring function alltrimc(cstring S, Char(1) S1)

varchar function valltrimc(varchar S, Char(1) S1)

Description

Alltrim removes all leading and trailing characters from string S that match the first char contained in S1

Example Stored Procedure

CREATE PROCEDURE test_valltrimc (s varchar(30), s1 char(1))

RETURNS (result char(30)) AS

BEGIN

result = valltrimc(s,s1);

END!!

WISQL - calling the example stored procedure

execute procedure test_valltrimc("aaabbbccc","a");

RESULT

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

bbbccc

execute procedure test_valltrimc("aaabbbccc","c");

RESULT

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

aaabbb

execute procedure test_valltrimc("aaabbbaaa","a");

RESULT

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

bbb