Top

Name

make_string — make a string

Synopsis

make_string ( in count integer );
 

Description

make_string returns a new string of length count, filled with binary zeros.

If count is zero, an empty string '' is returned.

Parameters

count

Length of the string to be generated.

Return Values

A string with defined length is returned.

Examples

Example 24.215. Using make_string and aref

Make a string and fill it with character sequence containing the alphabet upper case characters from A to Z.

SQL> create procedure
alphabet_string ()
{
  declare _inx integer;
  declare _str varchar;
  _str := make_string (26);

  while (_inx < 26)
    {
      aset (_str, _inx, _inx + 65);
      _inx := _inx + 1;
    }
  return (_str);
}
;

Done. -- 6 msec.
SQL> select alphabet_string ();
callret
VARCHAR NOT NULL
_______________________________________________________________________________

ABCDEFGHIJKLMNOPQRSTUVWXYZ

1 Rows. -- 4 msec.


See Also

vector() , aref , aset