I have a hard time figuring out when you would use such a function. I do 
not believe you will be able to duplicate this behavior without 
constructing your own UDF or by writing a stored procedure. BTW, why *do* 
you want this function?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Scott Klarenbach <[EMAIL PROTECTED]> wrote on 05/27/2005 01:30:35 
PM:

> I'm trying to replicate this PHP behavior in a MySQL stored procedure.
>  The purpose is to pad every character of the string with a pad
> character.  For example, if the pad character is 'x' and the string is
> 'STRING', the result is 'xSxTxRxIxNxGx'.
> 
> Here is the PHP code if it helps.  I'd like to use a regular
> expression to replace, but I guess I could loop through the string
> char by char and build a new one, it's just less elegant.  Thanks in
> advance.
> 
> PHP:
> -------------
> $regPattern =  implode('x', preg_split('//', "STRING", -1,
> PREG_SPLIT_NO_EMPTY));
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 

Reply via email to